mirror of https://github.com/abpframework/abp.git
5 changed files with 2349 additions and 0 deletions
@ -0,0 +1,22 @@ |
|||||
|
{ |
||||
|
"name": "abp-npm-scripts", |
||||
|
"version": "1.0.0", |
||||
|
"description": "", |
||||
|
"scripts": { |
||||
|
"remove-lock-files": "ts-node -r tsconfig-paths/register remove-lock-files.ts" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"chalk": "^4.1.0", |
||||
|
"commander": "^6.1.0", |
||||
|
"execa": "^4.0.3", |
||||
|
"fs-extra": "^9.0.1", |
||||
|
"glob": "^7.1.6", |
||||
|
"npm-check-updates": "^9.0.1", |
||||
|
"typescript": "^4.0.2" |
||||
|
}, |
||||
|
"devDependencies": { |
||||
|
"@types/fs-extra": "^9.0.1", |
||||
|
"ts-node": "^9.0.0", |
||||
|
"tsconfig-paths": "^3.9.0" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
import fse from 'fs-extra'; |
||||
|
import { log } from './utils/log'; |
||||
|
|
||||
|
removeLockFiles(); |
||||
|
|
||||
|
export async function removeLockFiles() { |
||||
|
const folders = [ |
||||
|
'../../templates/app/angular', |
||||
|
'../../templates/app/react-native', |
||||
|
'../../templates/module/angular', |
||||
|
]; |
||||
|
|
||||
|
try { |
||||
|
for (let i = 0; i < folders.length; i++) { |
||||
|
await fse.remove(`${folders[i]}/yarn.lock`); |
||||
|
await fse.remove(`${folders[i]}/package-lock.json`); |
||||
|
} |
||||
|
} catch (error) { |
||||
|
throwError(error?.message || error); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function throwError(error: string) { |
||||
|
log.error(error); |
||||
|
process.exit(1); |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
{ |
||||
|
"compilerOptions": { |
||||
|
"module": "commonjs", |
||||
|
"declaration": true, |
||||
|
"removeComments": true, |
||||
|
"emitDecoratorMetadata": true, |
||||
|
"experimentalDecorators": true, |
||||
|
"target": "es2017", |
||||
|
"sourceMap": true, |
||||
|
"outDir": "./dist", |
||||
|
"baseUrl": "./", |
||||
|
"incremental": true, |
||||
|
"esModuleInterop": true, |
||||
|
"types": ["node"] |
||||
|
}, |
||||
|
"exclude": ["node_modules", "dist"] |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
import { bold } from 'chalk'; |
||||
|
|
||||
|
export const log = { |
||||
|
info: (message: string) => console.log(bold.blue(`\n${message}\n`)), |
||||
|
error: (message: string) => console.log(bold.underline.red(`\n${message}\n`)), |
||||
|
}; |
||||
File diff suppressed because it is too large
Loading…
Reference in new issue