From 896a65d69090cad494ee82b8d65f00e37d86e1dc Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Fri, 6 Dec 2019 09:52:38 +0300 Subject: [PATCH] build: improve build script add prepare:workspace script --- npm/ng-packs/package.json | 3 ++- npm/ng-packs/scripts/build.js | 4 ++-- npm/ng-packs/scripts/package-lock.json | 3 ++- npm/ng-packs/scripts/package.json | 7 ++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index eada7a3cee..98871a1fc9 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -8,7 +8,8 @@ "commit": "git-cz", "lint": "ng lint", "scripts:build": "cd scripts && npm install && yarn build", - "ci": "yarn scripts:build --noCommit && yarn ci:test && yarn ng lint", + "prepare:workspace": "yarn scripts:build --noCommit", + "ci": "yarn prepare:workspace && yarn ci:test && yarn ng lint", "ci:test": "ng test --coverage=false" }, "devDependencies": { diff --git a/npm/ng-packs/scripts/build.js b/npm/ng-packs/scripts/build.js index 8258d85ff5..dca954af42 100644 --- a/npm/ng-packs/scripts/build.js +++ b/npm/ng-packs/scripts/build.js @@ -31,9 +31,9 @@ import program from 'commander'; await fse.writeJSON('../package.json', packageJson, { spaces: 2 }); try { - await execa('yarn', { + await execa('yarn', ['install', '--ignore-scripts'], { stdout: 'inherit', - cwd: '..', + cwd: '../', }); execa.sync( diff --git a/npm/ng-packs/scripts/package-lock.json b/npm/ng-packs/scripts/package-lock.json index 36bf73d5b9..fcce2fbb08 100644 --- a/npm/ng-packs/scripts/package-lock.json +++ b/npm/ng-packs/scripts/package-lock.json @@ -507,7 +507,8 @@ "esm": { "version": "3.2.25", "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", - "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "dev": true }, "esutils": { "version": "2.0.2", diff --git a/npm/ng-packs/scripts/package.json b/npm/ng-packs/scripts/package.json index 5e070a2c2c..26dcb1d4a6 100644 --- a/npm/ng-packs/scripts/package.json +++ b/npm/ng-packs/scripts/package.json @@ -1,7 +1,7 @@ { "name": "scripts", "version": "1.0.0", - "description": "Abp publish helper scripts", + "description": "ABP helper scripts", "main": "index.js", "modules": "[build.js, sync.js]", "scripts": { @@ -10,13 +10,14 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", - "license": "ISC", "dependencies": { "babel-preset-node6": "^11.0.0", "commander": "^4.0.1", - "esm": "^3.2.25", "execa": "^2.0.3", "fs-extra": "^8.1.0", "prompt-confirm": "^2.0.4" + }, + "devDependencies": { + "esm": "^3.2.25" } }