Skip to content

Commit

Permalink
minor formatting of script
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed May 19, 2021
1 parent 486f21e commit 6e90d9d
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions scripts/build-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@ const shell = require('shelljs')
const angularCli = require('@angular/cli');
const elementsPath = 'dist/wvr-elements';

const next = process.argv[2] ?
'--tag next' :
'';
const next = process.argv[2] ? '--tag next' : '';

angularCli.default({
cliArgs: [
'b',
'--project=wvr-elements'
],
inputStream: process.stdin,
outputStream: process.stdout
}).then(c => {
fs.copySync('projects/wvr-elements/src/lib/shared/styles', `${elementsPath}/styles`);
fs.copySync('scripts', `${elementsPath}/scripts`);
fs.copySync('.wvr-ud', `${elementsPath}/.wvr-ud`);
cliArgs: ['b', '--project=wvr-elements'],
inputStream: process.stdin,
outputStream: process.stdout
}).then(c => {
fs.copySync('projects/wvr-elements/src/lib/shared/styles', `${elementsPath}/styles`);
fs.copySync('scripts', `${elementsPath}/scripts`);
fs.copySync('.wvr-ud', `${elementsPath}/.wvr-ud`);

shell.exec(`npm publish ${elementsPath}/ ${next}`);
shell.exec(`npm publish ${elementsPath}/ ${next}`);

shell.exit();

});
shell.exit();
});

0 comments on commit 6e90d9d

Please sign in to comment.