File tree Expand file tree Collapse file tree 5 files changed +49
-13
lines changed Expand file tree Collapse file tree 5 files changed +49
-13
lines changed Original file line number Diff line number Diff line change 11language : node_js
22
33node_js :
4- - " 4.1"
5- - " 4.0"
4+ - " 4"
5+ - " 5"
6+ - " 6"
67
78before_script :
8- - npm install -g jscs@2
99 - npm install -g mocha
1010 - npm install -g gulp
1111
12+ before_install :
13+ - " npm install -g npm@latest"
14+
1215install :
1316 - npm install
1417
1518script :
1619 - npm test
20+
21+ env :
22+ - CXX=g++-4.8
23+
24+ addons :
25+ apt :
26+ sources :
27+ - ubuntu-toolchain-r-test
28+ packages :
29+ - g++-4.8
Original file line number Diff line number Diff line change 11# Express-React-HMR-Boilerplate
22
3- [ ![ Build Status] ( https://travis-ci.org/gocreating/express-react-hmr-boilerplate.svg?branch=master )] ( https://travis-ci.org/gocreating/express-react-hmr-boilerplate )
3+ [ ![ Build Status] ( https://travis-ci.org/gocreating/express-react-hmr-boilerplate.svg?branch=dev )] ( https://travis-ci.org/gocreating/express-react-hmr-boilerplate )
44[ ![ Dependency Status] ( https://david-dm.org/gocreating/express-react-hmr-boilerplate.svg )] ( https://david-dm.org/gocreating/express-react-hmr-boilerplate )
55
66This is a boilerplate for scaffolding MERN stack projects with livereload feature supported.
@@ -204,7 +204,7 @@ git flow feature finish upgrade-mirror
204204
205205### v1.0
206206
207- - [ ] Travis Testing
207+ - [x ] Travis Testing
208208- [ ] Asynchronous redux-form validation (detect duplicate username/email)
209209- [ ] Pagination Mechanism
210210
Original file line number Diff line number Diff line change 1- module . exports = {
2- jwt : {
3- secret : '4eO5viHe23' ,
4- expiresIn : 60 * 60 * 24 * 3 , // in seconds
5- } ,
6- mongo : require ( './mongo/credential' ) ,
7- firebase : require ( './firebase/credential.json' ) ,
8- } ;
1+ if ( process . env . TRAVIS ) {
2+ if ( ! process . env . PROJECT_SERVER_CONFIGS ) {
3+ throw new Error (
4+ 'Environment variable `PROJECT_SERVER_CONFIGS` is not set. ' +
5+ 'Please dump by running `gulp dumpConfigs`'
6+ ) ;
7+ }
8+ module . exports = JSON . parse ( process . env . PROJECT_SERVER_CONFIGS ) ;
9+ } else {
10+ module . exports = {
11+ jwt : {
12+ secret : '4eO5viHe23' ,
13+ expiresIn : 60 * 60 * 24 * 3 , // in seconds
14+ } ,
15+ mongo : require ( './mongo/credential' ) ,
16+ firebase : require ( './firebase/credential.json' ) ,
17+ } ;
18+ }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ var nodemon = require('gulp-nodemon');
1212var notify = require ( 'gulp-notify' ) ;
1313var async = require ( 'async' ) ;
1414var mergeStream = require ( 'merge-stream' ) ;
15+ var jsesc = require ( 'jsesc' ) ;
1516
1617// local modules
1718var webpackConfig = {
@@ -238,6 +239,17 @@ gulp.task('deploy', function(cb) {
238239 ] , cbCmdDone ) ;
239240} ) ;
240241
242+ gulp . task ( 'dumpConfigs' , function ( ) {
243+ var projectServerConfigs = require ( './configs/project/server' ) ;
244+ var dumpValue = jsesc ( JSON . stringify ( projectServerConfigs ) , { json : true } ) ;
245+ console . log ( gutil . colors . gray ( '\n\n=======================' ) ) ;
246+ console . log ( 'Please follow the instructions:' ) ;
247+ console . log ( '1. Go to `https://travis-ci.org/<owner>/<repo>/settings`' ) ;
248+ console . log ( '2. Add new environment variable named `' + gutil . colors . yellow ( 'PROJECT_SERVER_CONFIGS' ) + '`' ) ;
249+ console . log ( '3. Set its value as\n' + gutil . colors . yellow ( dumpValue ) ) ;
250+ console . log ( gutil . colors . gray ( '=======================\n\n' ) ) ;
251+ } ) ;
252+
241253gulp . task ( 'build:production' , function ( ) {
242254 gulp . start (
243255 'clean' ,
Original file line number Diff line number Diff line change 7979 "gulp-notify" : " ^2.2.0" ,
8080 "gulp-sourcemaps" : " ^1.6.0" ,
8181 "gulp-util" : " ^3.0.7" ,
82+ "jsesc" : " ^2.2.0" ,
8283 "merge-stream" : " ^1.0.0" ,
8384 "node-sass" : " ^3.8.0" ,
8485 "postcss-loader" : " ^0.9.1" ,
You can’t perform that action at this time.
0 commit comments