mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 21:57:22 +01:00
Merge pull request #6811 from crookedneighbor/upgrade_babel
chore: upgrade babel to v6
This commit is contained in:
@@ -8,7 +8,7 @@ import babel from 'babelify';
|
||||
|
||||
gulp.task('browserify', function () {
|
||||
let bundler = browserify({
|
||||
entries: './common/index.js',
|
||||
entries: './common/browserify.js',
|
||||
debug: true,
|
||||
transform: [[babel, { compact: false }]],
|
||||
});
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import gulp from 'gulp';
|
||||
import babel from 'gulp-babel';
|
||||
require('gulp-grunt')(gulp);
|
||||
|
||||
gulp.task('build', () => {
|
||||
@@ -9,6 +10,20 @@ gulp.task('build', () => {
|
||||
}
|
||||
});
|
||||
|
||||
gulp.task('build:src', () => {
|
||||
return gulp.src('website/src/**/*.js')
|
||||
.pipe(babel())
|
||||
.pipe(gulp.dest('website/transpiled-babel/'));
|
||||
});
|
||||
|
||||
gulp.task('build:common', () => {
|
||||
return gulp.src('common/script/**/*.js')
|
||||
.pipe(babel())
|
||||
.pipe(gulp.dest('common/transpiled-babel/'));
|
||||
});
|
||||
|
||||
gulp.task('build:server', ['build:src', 'build:common']);
|
||||
|
||||
gulp.task('build:dev', ['browserify', 'prepare:staticNewStuff'], (done) => {
|
||||
gulp.start('grunt-build:dev', done);
|
||||
});
|
||||
@@ -17,6 +32,6 @@ gulp.task('build:dev:watch', ['build:dev'], () => {
|
||||
gulp.watch(['website/public/**/*.styl', 'common/script/*']);
|
||||
});
|
||||
|
||||
gulp.task('build:prod', ['browserify', 'prepare:staticNewStuff'], (done) => {
|
||||
gulp.task('build:prod', ['browserify', 'build:server', 'prepare:staticNewStuff'], (done) => {
|
||||
gulp.start('grunt-build:prod', done);
|
||||
});
|
||||
|
||||
@@ -72,7 +72,7 @@ gulp.task('test:prepare:server', ['test:prepare:mongo'], () => {
|
||||
}
|
||||
});
|
||||
|
||||
gulp.task('test:prepare:build', (cb) => {
|
||||
gulp.task('test:prepare:build', ['build'], (cb) => {
|
||||
exec(testBin('grunt build:test'), cb);
|
||||
});
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export var conf = nconf;
|
||||
* its tasks.
|
||||
*/
|
||||
export function kill(proc) {
|
||||
((pid) => {
|
||||
let killProcess = (pid) => {
|
||||
psTree(pid, (_, pids) => {
|
||||
if(pids.length) {
|
||||
pids.forEach(kill); return
|
||||
@@ -32,7 +32,9 @@ export function kill(proc) {
|
||||
}
|
||||
catch(e) { console.log(e) }
|
||||
});
|
||||
}(proc.PID || proc.pid));
|
||||
}
|
||||
|
||||
killProcess(proc.PID || proc.pid);
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user