Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,6 @@ oclif.manifest.json
/android
/ios
.env

# TypeScript build info
*.tsbuildinfo
15 changes: 14 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,17 @@ import {fileURLToPath} from 'node:url'

const gitignorePath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '.gitignore')

export default [includeIgnoreFile(gitignorePath), ...oclif, prettier]
export default [
includeIgnoreFile(gitignorePath),
...oclif,
prettier,
{
rules: {
// Allow util.styleText even though it's marked as experimental by ESLint
// It's available and stable in Node.js 22.13.0+ (our minimum required version)
'n/no-unsupported-features/node-builtins': ['error', {
ignores: ['util.styleText']
}]
}
}
]
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"version": "oclif readme && git add README.md"
},
"engines": {
"node": ">=18.0.0"
"node": ">=22.13.0"
},
"type": "module",
"main": "dist/index.js",
Expand All @@ -53,7 +53,6 @@
"dependencies": {
"@oclif/core": "^4.5.2",
"@oclif/plugin-help": "^6.2.32",
"ansis": "^4.0.0",
"sharp": "^0.34.1"
},
"devDependencies": {
Expand Down
9 changes: 0 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/commands/dotenv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*/

import { Args, Command, Flags } from '@oclif/core'
import { cyan, green, red, yellow } from 'ansis'
import { copyFile, unlink } from 'node:fs/promises'

import { cyan, green, red, yellow } from '../utils/color.utils.js'
import { checkAssetFile } from '../utils/file-utils.js'

export default class Dotenv extends Command {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import { Args, Command, Flags } from '@oclif/core'
import { cyan, green, red, yellow } from 'ansis'
import { writeFile } from 'node:fs/promises'
import { join } from 'node:path'
import sharp from 'sharp'
Expand All @@ -17,6 +16,7 @@ import type { ContentJson } from '../types.js'
import { ICON_SIZES_ANDROID, ICON_SIZES_IOS } from '../constants.js'
import { MaskType } from '../types.js'
import { extractAppName } from '../utils/app.utils.js'
import { cyan, green, red, yellow } from '../utils/color.utils.js'
import { checkAssetFile, mkdirp } from '../utils/file-utils.js'

export default class Icons extends Command {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/splash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import { Args, Command, Flags } from '@oclif/core'
import { cyan, green, red, yellow } from 'ansis'
import { writeFile } from 'node:fs/promises'
import { join } from 'node:path'
import sharp from 'sharp'
Expand All @@ -16,6 +15,7 @@ import type { ContentJson, SplashscreenSize } from '../types.js'

import { SPLASHSCREEN_SIZES_ANDROID, SPLASHSCREEN_SIZES_IOS } from '../constants.js'
import { extractAppName } from '../utils/app.utils.js'
import { cyan, green, red, yellow } from '../utils/color.utils.js'
import { checkAssetFile, mkdirp } from '../utils/file-utils.js'

export default class Splash extends Command {
Expand Down
19 changes: 19 additions & 0 deletions src/utils/color.utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2025 ForWarD Software (https://forwardsoftware.solutions/)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

import { styleText } from 'node:util'

/**
* Color helper functions using util.styleText
* These functions provide a simple API for terminal text styling
*/

export const cyan = (text: string) => styleText('cyan', text)
export const green = (text: string) => styleText('green', text)
export const red = (text: string) => styleText('red', text)
export const yellow = (text: string) => styleText('yellow', text)
Loading