mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-13 20:57:24 +01:00
* Remove gulp/* and gulpfile from ESLint ignores * Update .eslintrc in local gulp folder * Start work on refactoring gulp files * add radix * Add line-specific eslint exceptions * removed redundant eslint file for gulp * add more exceptions * Add exceptions to main gulpfile.js
38 lines
943 B
JavaScript
38 lines
943 B
JavaScript
import gulp from 'gulp';
|
|
import babel from 'gulp-babel';
|
|
import webpackProductionBuild from '../webpack/build';
|
|
|
|
gulp.task('build', () => {
|
|
if (process.env.NODE_ENV === 'production') { // eslint-disable-line no-process-env
|
|
gulp.start('build:prod');
|
|
}
|
|
});
|
|
|
|
gulp.task('build:src', () => {
|
|
return gulp.src('website/server/**/*.js')
|
|
.pipe(babel())
|
|
.pipe(gulp.dest('website/transpiled-babel/'));
|
|
});
|
|
|
|
gulp.task('build:common', () => {
|
|
return gulp.src('website/common/script/**/*.js')
|
|
.pipe(babel())
|
|
.pipe(gulp.dest('website/common/transpiled-babel/'));
|
|
});
|
|
|
|
gulp.task('build:server', ['build:src', 'build:common']);
|
|
|
|
// Client Production Build
|
|
gulp.task('build:client', ['bootstrap'], (done) => {
|
|
webpackProductionBuild((err, output) => {
|
|
if (err) return done(err);
|
|
console.log(output); // eslint-disable-line no-console
|
|
});
|
|
});
|
|
|
|
gulp.task('build:prod', [
|
|
'build:server',
|
|
'build:client',
|
|
'apidoc',
|
|
]);
|