chore(publish): fixed publish npm script to only call the script once

This commit is contained in:
Dan Bucholtz
2017-08-30 15:03:25 -05:00
parent ebfba59e97
commit c0bec89ee3
2 changed files with 5 additions and 2 deletions

View File

@ -17,7 +17,7 @@
"scripts": { "scripts": {
"build": "stencil build", "build": "stencil build",
"dev": "sd concurrent \"stencil build --dev --watch\" \"stencil-dev-server\"", "dev": "sd concurrent \"stencil build --dev --watch\" \"stencil-dev-server\"",
"publish": "npm run build && node scripts/publish.js && node scripts/publish.js && ../../node_modules/.bin/np --any-branch", "publish": "npm run build && node scripts/publish.js && ../../node_modules/.bin/np --any-branch",
"test": "jest --no-cache" "test": "jest --no-cache"
}, },
"author": "Ionic Team", "author": "Ionic Team",

View File

@ -1,3 +1,4 @@
console.log('Publish Script Starting ...');
var fs = require('fs'); var fs = require('fs');
var path = require('path'); var path = require('path');
@ -15,3 +16,5 @@ fs.writeFileSync(INDEX_JS_DIST, '');
console.log('publish: create', INDEX_DTS_DIST); console.log('publish: create', INDEX_DTS_DIST);
var srcIndexDTS = fs.readFileSync(INDEX_DTS_SRC, 'utf-8'); var srcIndexDTS = fs.readFileSync(INDEX_DTS_SRC, 'utf-8');
fs.writeFileSync(INDEX_DTS_DIST, srcIndexDTS); fs.writeFileSync(INDEX_DTS_DIST, srcIndexDTS);
console.log('Publish Script ... Complete');