From 7080443137899cb03ac5ad946dbc9ae6e3f2f7e6 Mon Sep 17 00:00:00 2001 From: Rafa Mel Date: Thu, 16 May 2019 01:52:43 +0200 Subject: [PATCH] chore(scripts): improves scripts --- kpo.scripts.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kpo.scripts.js b/kpo.scripts.js index 665be50..b186e70 100644 --- a/kpo.scripts.js +++ b/kpo.scripts.js @@ -1,5 +1,5 @@ // prettier-ignore -const { series, parallel, ensure, line, json, log, confirm, rm, remove, copy, kpo, silent } = require('kpo'); +const { series, parallel, ensure, line, json, log, confirm, rm, remove, kpo, silent } = require('kpo'); const path = require('path'); const bump = require('conventional-recommended-bump'); const { promisify } = require('util'); @@ -21,7 +21,7 @@ module.exports.scripts = { build: { default: kpo`validate build.force`, force: series.env('kpo build.pack build.types', { NODE_ENV: 'production' }), - $pack: [ensure`./pkg`, 'pack build', copy(['.npmignore'], './pkg')].concat( + $pack: [ensure`./pkg`, 'pack build'].concat( vars.node && [ line`babel src --out-dir ./pkg/dist-node --extensions ${vars.dotExt} --source-maps inline`, @@ -52,8 +52,10 @@ module.exports.scripts = { }); }), release: [ + series('npm publish --dry-run', { cwd: './pkg' }), + confirm({ no: Error() }), series('npm publish', { cwd: './pkg' }), - ['git push', 'git push --tags'] + series(['git push', 'git push --tags'], { args: [] }) ], watch: { default: 'onchange ./src --initial --kill -- kpo watch.task',