Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
HAWKULAR-46: Added handling of src files to gulp
Browse files Browse the repository at this point in the history
Conflicts:
	ui/console/src/main/scripts/gulpfile.js
  • Loading branch information
Viliam Rockai committed Mar 6, 2015
1 parent 50ec721 commit 1f8240c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
26 changes: 25 additions & 1 deletion ui/console/src/main/scripts/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,36 @@ gulp.task('clean', ['concat'], function () {
});

gulp.task('watch', ['build'], function () {
plugins.watch(['libs/**/*.js', 'libs/**/*.css', 'index.html', config.dist + '/' + config.js], function () {
plugins.watch(['libs/**/*.js', 'libs/**/*.css', config.dist + '/**/*'], function () {
gulp.start('reload');
});
plugins.watch(['index.html'], function () {
gulp.start('bower', 'reload');
});
plugins.watch(['libs/**/*.d.ts', config.ts, config.templates], function () {
gulp.start(['tslint-watch', 'tsc', 'template', 'concat', 'clean']);
});

plugins.watch([config.less], function () {
gulp.start(['less']);
});

/* If something in the src folder changes, just copy it and let the handlers above handle the situation */
plugins.watch(['../../src/main/scripts/**/*'], function () {
gulp.src('../../src/main/scripts/**/*')
.pipe(gulp.dest('.'));
});

plugins.watch(['../../src/main/webapp/resources/**/*'], function () {
gulp.src('../../src/main/webapp/resources/**/*')
.pipe(gulp.dest('./resources/'));
});

plugins.watch(['../../src/main/webapp/index.html'], function () {
gulp.src('../../src/main/webapp/index.html')
.pipe(plugins.replace('${hawkular.console.index.html.base.href}', '/'))
.pipe(gulp.dest('.'));
});
});

gulp.task('connect', ['watch'], function () {
Expand Down
1 change: 1 addition & 0 deletions ui/console/src/main/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"gulp-connect": "^2.2.0",
"gulp-load-plugins": "^0.8.0",
"gulp-notify": "^2.1.0",
"gulp-replace": "0.5.3",
"gulp-size": "^1.2.0",
"gulp-tslint": "^1.4.2",
"gulp-typescript": "^2.3.0",
Expand Down

0 comments on commit 1f8240c

Please sign in to comment.