Skip to content

Commit

Permalink
Merge 185eaa1 into ede4697
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Oct 12, 2020
2 parents ede4697 + 185eaa1 commit 0e82267
Show file tree
Hide file tree
Showing 6 changed files with 1,673 additions and 1,369 deletions.
2 changes: 1 addition & 1 deletion nsqadmin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Read the [docs](https://nsq.io/components/nsqadmin.html)
### Dependencies

1. Install [`go-bindata`](https://github.com/shuLhan/go-bindata)
2. Install NodeJS 8.x (includes npm)
2. Install NodeJS 14.x (includes npm)

### Workflow

Expand Down
34 changes: 17 additions & 17 deletions nsqadmin/bindata.go

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions nsqadmin/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ function logBundle(filename, watching) {


function sassTask(root, inputFile) {
return function() {
return function sassing() {
var onError = function(err) {
notify({'title': 'Sass Compile Error'}).write(err);
};
gulp.src(path.join(root, 'css', inputFile))
return gulp.src(path.join(root, 'css', inputFile))
.pipe(sass({
'sourceComments': 'map',
'onError': onError
Expand All @@ -63,7 +63,7 @@ function sassTask(root, inputFile) {


function browserifyTask(root, inputFile) {
return function() {
return function browserifying() {
var onError = function() {
var args = Array.prototype.slice.call(arguments);
notify.onError({
Expand Down Expand Up @@ -97,24 +97,24 @@ function browserifyTask(root, inputFile) {


function watchTask(root) {
return function() {
gulp.watch(path.join(root, 'sass/**/*.scss'), ['sass']);
return function watching() {
gulp.watch(path.join(root, 'sass/**/*.scss'), gulp.series('sass'));
gulp.watch([
path.join(root, 'js/**/*.js'),
path.join(root, 'js/**/*.hbs')
], ['browserify']);
], gulp.series('browserify'));
gulp.watch([
path.join(root, 'html/**'),
path.join(root, 'fonts/**')
], ['sync-static-assets'])
], gulp.series('sync-static-assets'))
};
}


function cleanTask(){
function cleanTask() {
var paths = Array.prototype.slice.apply(arguments);
return function () {
gulp.src(paths).pipe(clean());
return function cleaning() {
return gulp.src(paths, {allowEmpty: true}).pipe(clean());
};
}

Expand Down Expand Up @@ -153,8 +153,8 @@ gulp.task('sync-static-assets', function() {

gulp.task('sass', sassTask(ROOT, '*.*css'));
gulp.task('browserify', browserifyTask(ROOT, 'main.js'));
gulp.task('build', ['sass', 'browserify', 'sync-static-assets', 'vendor-build-js']);
gulp.task('watch', ['build'], watchTask(ROOT));
gulp.task('clean', cleanTask(path.join(ROOT, 'build')));
gulp.task('build', gulp.parallel('sass', 'browserify', 'sync-static-assets', 'vendor-build-js'));
gulp.task('watch', gulp.series('build', watchTask(ROOT)));
gulp.task('clean', gulp.series(cleanTask(path.join(ROOT, 'build'))));

gulp.task('default', ['help']);
gulp.task('default', gulp.series('help'));

0 comments on commit 0e82267

Please sign in to comment.