Skip to content

Commit

Permalink
Merge def011f into ede4697
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Oct 13, 2020
2 parents ede4697 + def011f commit 25a2aa0
Show file tree
Hide file tree
Showing 6 changed files with 1,946 additions and 1,492 deletions.
6 changes: 3 additions & 3 deletions nsqadmin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ 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

1. `$ npm install`
2. `$ ./gulp --series clean watch` or `$ ./gulp --series clean build`
3. `$ go-bindata --debug --pkg=nsqadmin --prefix=static/build static/build/...`
3. `$ go-bindata --debug --pkg=nsqadmin --prefix=static/build/ static/build/...`
4. `$ go build ../apps/nsqadmin && ./nsqadmin`
5. make changes (repeat step 4 only if you make changes to any Go code)
6. `$ go-bindata --pkg=nsqadmin --prefix=static/build static/build/...`
6. `$ go-bindata --pkg=nsqadmin --prefix=static/build/ static/build/...`
7. commit other changes and `bindata.go`
426 changes: 288 additions & 138 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 25a2aa0

Please sign in to comment.