Browse Source

improve build script

pull/9875/head
mehmet-erim 5 years ago
parent
commit
8ea9ea0177
  1. 3
      npm/ng-packs/.eslintrc.json
  2. 13
      npm/ng-packs/package.json
  3. 2
      npm/ng-packs/scripts/build-schematics.ts
  4. 3
      npm/ng-packs/scripts/build.ts

3
npm/ng-packs/.eslintrc.json

@ -26,7 +26,8 @@
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-empty-function": ["warn"]
"@typescript-eslint/no-empty-function": ["warn"],
"@typescript-eslint/no-empty-interface": ["warn"]
}
},
{

13
npm/ng-packs/package.json

@ -118,18 +118,5 @@
"tslint": "~6.1.0",
"typescript": "~4.3.5",
"zone.js": "~0.11.4"
},
"dependencies": {
"@angular/animations": "^12.1.0",
"@angular/common": "^12.1.0",
"@angular/compiler": "^12.1.0",
"@angular/core": "^12.1.0",
"@angular/forms": "^12.1.0",
"@angular/platform-browser": "^12.1.0",
"@angular/platform-browser-dynamic": "^12.1.0",
"@angular/router": "^12.1.0",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
}
}

2
npm/ng-packs/scripts/build-schematics.ts

@ -56,7 +56,7 @@ async function* copyPackageFiles(packageName: string) {
try {
await fse.remove(`../dist/packages/${PACKAGE_TO_BUILD}`);
await execa('yarn', ['install'], { cwd: '../packages/schematics' });
await execa('yarn', ['install'], { stdout: 'inherit', cwd: `../packages/${PACKAGE_TO_BUILD}` });
await execa(
'tsc',

3
npm/ng-packs/scripts/build.ts

@ -1,5 +1,6 @@
import program from 'commander';
import execa from 'execa';
import fse from 'fs-extra';
(async () => {
program.option('-i, --noInstall', 'skip updating package.json and installation', false);
@ -12,6 +13,8 @@ import execa from 'execa';
await execa('yarn', ['install'], { stdout: 'inherit', cwd: '../' });
}
await fse.remove('../dist');
await execa(
'yarn',
[

Loading…
Cancel
Save