Browse Source

build: improve build script

add prepare:workspace script
pull/2327/head
mehmet-erim 7 years ago
parent
commit
896a65d690
  1. 3
      npm/ng-packs/package.json
  2. 4
      npm/ng-packs/scripts/build.js
  3. 3
      npm/ng-packs/scripts/package-lock.json
  4. 7
      npm/ng-packs/scripts/package.json

3
npm/ng-packs/package.json

@ -8,7 +8,8 @@
"commit": "git-cz", "commit": "git-cz",
"lint": "ng lint", "lint": "ng lint",
"scripts:build": "cd scripts && npm install && yarn build", "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" "ci:test": "ng test --coverage=false"
}, },
"devDependencies": { "devDependencies": {

4
npm/ng-packs/scripts/build.js

@ -31,9 +31,9 @@ import program from 'commander';
await fse.writeJSON('../package.json', packageJson, { spaces: 2 }); await fse.writeJSON('../package.json', packageJson, { spaces: 2 });
try { try {
await execa('yarn', { await execa('yarn', ['install', '--ignore-scripts'], {
stdout: 'inherit', stdout: 'inherit',
cwd: '..', cwd: '../',
}); });
execa.sync( execa.sync(

3
npm/ng-packs/scripts/package-lock.json

@ -507,7 +507,8 @@
"esm": { "esm": {
"version": "3.2.25", "version": "3.2.25",
"resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
"integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
"dev": true
}, },
"esutils": { "esutils": {
"version": "2.0.2", "version": "2.0.2",

7
npm/ng-packs/scripts/package.json

@ -1,7 +1,7 @@
{ {
"name": "scripts", "name": "scripts",
"version": "1.0.0", "version": "1.0.0",
"description": "Abp publish helper scripts", "description": "ABP helper scripts",
"main": "index.js", "main": "index.js",
"modules": "[build.js, sync.js]", "modules": "[build.js, sync.js]",
"scripts": { "scripts": {
@ -10,13 +10,14 @@
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": "", "author": "",
"license": "ISC",
"dependencies": { "dependencies": {
"babel-preset-node6": "^11.0.0", "babel-preset-node6": "^11.0.0",
"commander": "^4.0.1", "commander": "^4.0.1",
"esm": "^3.2.25",
"execa": "^2.0.3", "execa": "^2.0.3",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
"prompt-confirm": "^2.0.4" "prompt-confirm": "^2.0.4"
},
"devDependencies": {
"esm": "^3.2.25"
} }
} }

Loading…
Cancel
Save