mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-09-29 04:39:04 +00:00
Update gulpfile
- Build tests in `gulp build` - Watch test files - Clean test files as well
This commit is contained in:
parent
ecbb84146f
commit
df698a24ba
@ -14,7 +14,7 @@ const PATHS = setUpPaths();
|
|||||||
gulp.task('default', ['build']);
|
gulp.task('default', ['build']);
|
||||||
|
|
||||||
gulp.task('build', callback => {
|
gulp.task('build', callback => {
|
||||||
runSequence('clean', ['build-cli', 'build-app'], callback);
|
runSequence('clean', ['build-cli', 'build-app', 'build-tests'], callback);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build-app', ['build-static'], () => {
|
gulp.task('build-app', ['build-static'], () => {
|
||||||
@ -26,9 +26,11 @@ gulp.task('build-app', ['build-static'], () => {
|
|||||||
gulp.task('clean', callback => {
|
gulp.task('clean', callback => {
|
||||||
del(PATHS.CLI_DEST).then(() => {
|
del(PATHS.CLI_DEST).then(() => {
|
||||||
del(PATHS.APP_DEST).then(() => {
|
del(PATHS.APP_DEST).then(() => {
|
||||||
|
del(PATHS.TEST_DEST).then(() => {
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build-cli', done => {
|
gulp.task('build-cli', done => {
|
||||||
@ -65,6 +67,9 @@ gulp.task('watch', ['build'], () => {
|
|||||||
|
|
||||||
gulp.watch(PATHS.CLI_SRC_JS, ['build-cli'])
|
gulp.watch(PATHS.CLI_SRC_JS, ['build-cli'])
|
||||||
.on('error', handleError);
|
.on('error', handleError);
|
||||||
|
|
||||||
|
gulp.watch(PATHS.TEST_SRC_JS, ['build-tests'])
|
||||||
|
.on('error', handleError);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('publish', done => {
|
gulp.task('publish', done => {
|
||||||
@ -92,7 +97,7 @@ gulp.task('build-tests', done => {
|
|||||||
.pipe(gulp.dest(PATHS.TEST_DEST));
|
.pipe(gulp.dest(PATHS.TEST_DEST));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('test', ['build', 'build-tests'], () => {
|
gulp.task('test', ['build'], () => {
|
||||||
return gulp.src(PATHS.TEST_DEST_JS, {read: false})
|
return gulp.src(PATHS.TEST_DEST_JS, {read: false})
|
||||||
.pipe(mocha());
|
.pipe(mocha());
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user