Browse Source

Switch from `enclose` to `pkg` (#127)

* removed `enclose`, added `pkg`

* pinned `pkg`version

* bump pkg to beta.4
master
Igor Klopov 8 years ago
committed by Guillermo Rauch
parent
commit
9414d8b078
  1. 2
      bin/now
  2. 5
      enclose.js
  3. 9
      gulpfile.babel.js
  4. 9
      package.json

2
bin/now

@ -40,7 +40,7 @@ if (commands.has(cmd)) {
}
let bin = resolve(__dirname, 'now-' + cmd);
if (process.enclose) {
if (process.pkg) {
args.unshift('--entrypoint', bin);
bin = process.execPath;
}

5
enclose.js

@ -1,5 +0,0 @@
module.exports = {
scripts: [
"build/bin/now-*"
]
};

9
gulpfile.babel.js

@ -2,7 +2,6 @@ import gulp from 'gulp';
import del from 'del';
import babel from 'gulp-babel';
import help from 'gulp-task-listing';
import { exec as enclose } from 'enclose';
gulp.task('help', help);
@ -21,14 +20,6 @@ gulp.task('compile-bin', () =>
.pipe(babel())
.pipe(gulp.dest('build/bin')));
gulp.task('enclose', ['compile'], (cb) => {
enclose([
'build/bin/now',
'-c', 'enclose.js',
'-o', 'build/now'
], cb);
});
gulp.task('watch-lib', () => gulp.watch('lib/**/*.js', ['compile-lib']));
gulp.task('watch-bin', () => gulp.watch('bin/*', ['compile-bin']));
gulp.task('clean', () => del(['build']));

9
package.json

@ -90,7 +90,6 @@
"babel-preset-es2015": "6.14.0",
"babel-register": "6.14.0",
"del": "2.2.2",
"enclose": "2.2.0",
"eslint": "3.4.0",
"eslint-config-standard": "6.0.0",
"eslint-plugin-promise": "2.0.1",
@ -99,13 +98,17 @@
"gulp": "3.9.1",
"gulp-babel": "6.1.2",
"gulp-eslint": "3.0.1",
"gulp-task-listing": "1.0.1"
"gulp-task-listing": "1.0.1",
"pkg": "3.0.0-beta.4"
},
"scripts": {
"start": "gulp",
"test": "ava",
"prepublish": "gulp compile",
"enclose": "gulp enclose"
"pkg": "pkg ."
},
"pkgConfig": {
"scripts": "build/**/*"
},
"ava": {
"failFast": true,

Loading…
Cancel
Save