0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-10 22:22:45 -05:00

refactor(cli): use modern technology

This commit is contained in:
Gao Sun 2022-10-13 15:39:28 +08:00
parent e284b796cd
commit 4c755491db
No known key found for this signature in database
GPG key ID: 13EBE123E4773688
5 changed files with 6 additions and 6 deletions

View file

@ -1 +1,2 @@
alteration-scripts/
src/package-json.ts

View file

@ -1 +0,0 @@
enable-pre-post-scripts=true

View file

@ -19,8 +19,8 @@
},
"scripts": {
"precommit": "lint-staged",
"build": "rimraf lib && tsc -p tsconfig.build.json",
"postbuild": "unlink ./lib/package.json && ln -s ../package.json ./lib/package.json",
"prepare:package-json": "node -p \"'export const packageJson = ' + JSON.stringify(require('./package.json'), undefined, 2) + ';'\" > src/package-json.ts",
"build": "rimraf lib && pnpm prepare:package-json && tsc -p tsconfig.build.json",
"start": "node .",
"start:dev": "ts-node --files src/index.ts",
"lint": "eslint --ext .ts src",
@ -84,7 +84,8 @@
"error",
7
]
}
},
"ignorePatterns": ["src/package-json.ts"]
},
"prettier": "@silverhand/eslint-config/.prettierrc"
}

View file

@ -6,7 +6,7 @@ import { hideBin } from 'yargs/helpers';
import connector from './commands/connector';
import database from './commands/database';
import install from './commands/install';
import packageJson from './package.json';
import { packageJson } from './package-json';
import { cliConfig, ConfigKey } from './utilities';
void yargs(hideBin(process.argv))

View file

@ -1 +0,0 @@
../package.json