Skip to content

Commit

Permalink
chore: update publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Apr 9, 2019
1 parent d815c00 commit edbf45b
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions scripts/publish.js
Expand Up @@ -10,7 +10,7 @@ if (
.stdout.indexOf('https://registry.npmjs.org/') === -1
) {
console.error(
'Failed: set npm registry to https://registry.npmjs.org/ first'
'Failed: set npm registry to https://registry.npmjs.org/ first',
);
process.exit(1);
}
Expand All @@ -33,33 +33,13 @@ if (buildCode === 1) {
process.exit(1);
}

const { code: buildUmdCleanCode } = shell.exec('npm run build:umd:clean');
if (buildUmdCleanCode === 1) {
console.error('Failed: npm run build:umd:clean');
process.exit(1);
}

// const { code: buildUmdCode } = shell.exec('npm run build:umd');
// if (buildUmdCode === 1) {
// console.error('Failed: npm run build:umd');
// process.exit(1);
// }
//
// const { code: buildUmdProductionCode } = shell.exec(
// 'npm run build:umd:production'
// );
// if (buildUmdProductionCode === 1) {
// console.error('Failed: npm run build:umd:production');
// process.exit(1);
// }

const cp = fork(
join(process.cwd(), 'node_modules/.bin/lerna'),
['publish', '--skip-npm'].concat(process.argv.slice(2)),
{
stdio: 'inherit',
cwd: process.cwd(),
}
},
);
cp.on('error', err => {
console.log(err);
Expand Down

0 comments on commit edbf45b

Please sign in to comment.