Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions SingularityService/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,18 @@
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>bower install</id>
<goals>
<goal>bower</goal>
</goals>
</execution>
<execution>
<id>gulp build</id>
<goals>
<goal>gulp</goal>
</goals>
</execution>
</executions>
</plugin>
Expand Down
39 changes: 39 additions & 0 deletions SingularityUI/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
var gulp = require('gulp');
var path = require('path');
var del = require('del');
var child_process = require('child_process');

var dest = path.resolve(__dirname, '../SingularityService/target/generated-resources/assets');

gulp.task("clean", function() {
return del([
path.resolve(dest, 'static/**'),
path.resolve(dest, 'index.html')], {force: true});
});

gulp.task("build", function(cb) {
var brunch = child_process.execFile('node_modules/brunch/bin/brunch', ['build', '--production']);

var hasStderrOutput = false;

brunch.stdout.pipe(process.stdout);
brunch.stderr.pipe(process.stderr);

brunch.stderr.on('data', function () {
hasStderrOutput = true;
});

brunch.on('error', cb);

brunch.on('exit', function (code) {
if (hasStderrOutput) {
cb(new Error("Brunch build failed"));
} else if (code != 0) {
cb(new Error("Brunch exited with code " + code));
} else {
cb();
}
});
});

gulp.task("default", ["clean", "build"]);
8 changes: 6 additions & 2 deletions SingularityUI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"brunch": "./node_modules/brunch/bin/brunch"
},
"scripts": {
"start": "brunch watch --server",
"postinstall": "bower install --allow-root && brunch build --production"
"start": "brunch watch --server"
},
"dependencies": {
"bower": "^1.7.6",
Expand All @@ -32,5 +31,10 @@
"react-coffee-brunch": "^1.7.2",
"stylus-brunch": "^2.0.0",
"uglify-js-brunch": "^2.0.0"
},
"license": "Apache 2.0",
"devDependencies": {
"del": "^2.2.0",
"gulp": "^3.9.1"
}
}