mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 10:38:55 +00:00
Add script for release to npm
This commit is contained in:
parent
01ae53c590
commit
74c8ffbea6
@ -4,8 +4,8 @@ import sourcemaps from 'gulp-sourcemaps';
|
||||
import webpack from 'webpack-stream';
|
||||
import babel from 'gulp-babel';
|
||||
import runSequence from 'run-sequence';
|
||||
|
||||
import path from 'path';
|
||||
import childProcess from 'child_process';
|
||||
|
||||
const PATHS = setUpPaths();
|
||||
|
||||
@ -55,6 +55,15 @@ gulp.task('watch', ['build'], () => {
|
||||
.on('error', handleError);
|
||||
});
|
||||
|
||||
gulp.task('publish', done => {
|
||||
childProcess.spawn('npm', ['publish'], {stdio: 'inherit'})
|
||||
.on('close', done);
|
||||
});
|
||||
|
||||
gulp.task('release', callback => {
|
||||
return runSequence('build', 'publish', callback);
|
||||
});
|
||||
|
||||
function setUpPaths() {
|
||||
const paths = {
|
||||
WEBPACK_CONFIG: './webpack.config.js',
|
||||
|
@ -13,11 +13,12 @@
|
||||
"scripts": {
|
||||
"dev-up": "npm install && (cd app && npm install)",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"clean": "gulp clean",
|
||||
"build": "gulp build",
|
||||
"watch": "while true ; do gulp watch ; done",
|
||||
"package-placeholder": "npm run build && node lib/cli.js http://www.medium.com ~/Desktop --overwrite && open ~/Desktop/Medium-darwin-x64/Medium.app",
|
||||
"start-placeholder": "npm run build && electron app",
|
||||
"clean": "gulp clean"
|
||||
"release": "gulp release"
|
||||
},
|
||||
"bin": {
|
||||
"nativefier": "lib/cli.js"
|
||||
|
Loading…
Reference in New Issue
Block a user