Skip to content

Instantly share code, notes, and snippets.

@hoorayimhelping
Created September 10, 2015 17:42
Show Gist options
  • Save hoorayimhelping/4fc478121877fbac3f85 to your computer and use it in GitHub Desktop.
Save hoorayimhelping/4fc478121877fbac3f85 to your computer and use it in GitHub Desktop.
diff --git a/gulpfile.js b/gulpfile.js
index 07ae90c..5fe0bd0 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -13,6 +13,10 @@ var paths = {
'js_dist': 'dist/'
};
+gulp.task('env', function() {
+ process.env.NODE_ENV = 'production';
+});
+
gulp.task('lint', function() {
return gulp.src([
paths.js_source + '*.js',
@@ -43,4 +47,5 @@ if (true) return;
});
gulp.task('default', ['lint', 'test', 'build']);
-gulp.task('pre-commit', ['default']);
+gulp.taks('production', ['env', 'lint', 'test', 'build']);
+gulp.task('pre-commit', ['production']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment