Skip to content

Commit 200566e

Browse files
author
Emmanouil Konstantinidis
committed
Gulp, release - react in production
1 parent adde38b commit 200566e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

gulpfile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ gulp.task('copy:fonts', function () {
6767
.pipe(gulp.dest('./dist/fonts'));
6868
});
6969

70-
gulp.task('build', ['copy:fonts', 'build:js', 'build:scss']);
70+
gulp.task('apply-prod-environment', function() {
71+
process.env.NODE_ENV = 'production';
72+
});
73+
7174
gulp.task('watch', ['watch:js', 'watch:scss']);
75+
gulp.task('build', ['copy:fonts', 'build:js', 'build:scss']);
76+
gulp.task('release', ['apply-prod-environment', 'build']);
7277
gulp.task('default', ['build']);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"watch": "gulp watch",
99
"package": "electron-packager . Gitify --overwrite --platform=darwin --arch=x64 --version=1.0.2 --asar=true --icon=images/app-icon.icns --prune --ignore='src' --ignore='coverage'",
1010
"codesign": "bash scripts/codesign.bash",
11-
"dist": "npm run build && npm run package && npm run codesign",
11+
"dist": "gulp release && npm run package && npm run codesign",
1212
"lint-js": "eslint 'src/js/' 'src/js/app.js' 'main.js'",
1313
"lint-sass": "sass-lint -c .sass-lint.yml -v -q",
1414
"mocha": "mocha --opts src/js/__tests__/__helpers__/mocha.opts",

0 commit comments

Comments
 (0)