diff --git a/cli/.gitignore b/cli/.gitignore new file mode 100644 index 0000000..b137bd2 --- /dev/null +++ b/cli/.gitignore @@ -0,0 +1,12 @@ +# build +bin/ + +# deps +node_modules/ +package-lock.json +yarn.lock +pnpm-lock.yaml + +# dev +.vscode/ +.idea/ \ No newline at end of file diff --git a/cli/.prettierrc.yaml b/cli/.prettierrc.yaml new file mode 100644 index 0000000..aa7ff98 --- /dev/null +++ b/cli/.prettierrc.yaml @@ -0,0 +1,6 @@ +tabWidth: 4 +printWidth: 80 +singleQuote: true +semi: false +arrowParens: avoid +endOfLine: auto diff --git a/cli/package.json b/cli/package.json new file mode 100644 index 0000000..43e504e --- /dev/null +++ b/cli/package.json @@ -0,0 +1,25 @@ +{ + "name": "rage-framework-cli", + "version": "0.0.23", + "bin": { + "rage-fw": "bin/index.js" + }, + "main": "bin/index.js", + "scripts": { + "watch": "tsc -w" + }, + "description": "CLI to scaffold a template project for RageFW", + "keywords": [], + "author": "rilaxik", + "license": "ISC", + "dependencies": { + "chalk": "4.1.2", + "yargs": "^17.7.2" + }, + "devDependencies": { + "@types/node": "^20.14.2", + "@types/yargs": "^17.0.32", + "prettier": "^3.3.2", + "typescript": "^5.4.5" + } +} diff --git a/cli/src/index.ts b/cli/src/index.ts new file mode 100644 index 0000000..9a7e3dd --- /dev/null +++ b/cli/src/index.ts @@ -0,0 +1,4 @@ +import yargs from 'yargs' +import { hideBin } from 'yargs/helpers' + +yargs(hideBin(process.argv)).help().argv diff --git a/cli/tsconfig.json b/cli/tsconfig.json new file mode 100644 index 0000000..82ca4be --- /dev/null +++ b/cli/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + + "declaration": true, + "declarationMap": true, + "sourceMap": true, + + "outDir": "bin", + "esModuleInterop": true, + + "strict": true, + "forceConsistentCasingInFileNames": true, + "noImplicitAny": true + }, + "include": [ + "src/index.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file