diff --git a/.gitignore b/.gitignore index 81519f667..96e44e9bd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,7 @@ node_modules build npm-debug.log debug.log +datasources.test.json datasources.development.json .idea +.idea diff --git a/gulpfile.js b/gulpfile.js index 100db117e..66857b863 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -29,18 +29,26 @@ gulp.task('default', () => { return gulp.start('services', 'client'); }); -gulp.task('build', ['clean'], () => { - return gulp.start('routes', 'locales', 'webpack'); -}); - gulp.task('client', ['clean'], () => { return gulp.start('watch', 'routes', 'locales', 'webpack-dev-server'); }); -gulp.task('services', ['nginx'], () => { - if (gutil.env.env && !process.env.NODE_ENV) - process.env.NODE_ENV = gutil.env.env; +gulp.task('services', callback => { + let isWindows = /^win/.test(process.platform); + let command = isWindows ? 'docker inspect dblocal | findstr Status' : 'docker inspect dblocal | grep Status'; + exec(command, (err, stdout, stderr) => { + let isNotRunning = !stdout.includes('running'); + if (isNotRunning) { + runSequence('docker', 'waitForMySQL', 'run-services'); + } else { + runSequence('run-services'); + } + callback(err); + }); +}); + +gulp.task('run-services', ['nginx'], () => { const servicesPath = './services/'; const services = fs.readdirSync(servicesPath); services.splice(services.indexOf('loopback'), 1); @@ -72,19 +80,8 @@ gulp.task('install', () => { })); }); -gulp.task('servicesDev', callback => { - let isWindows = /^win/.test(process.platform); - let command = isWindows ? 'docker inspect dblocal | findstr Status' : 'docker inspect dblocal | grep Status'; - gutil.env.env = 'test'; - exec(command, (err, stdout, stderr) => { - let isNotRunning = !stdout.includes('running'); - if (isNotRunning) { - runSequence('docker', 'waitForMySQL', 'services'); - } else { - runSequence('services'); - } - callback(err); - }); +gulp.task('build', ['clean'], () => { + return gulp.start('routes', 'locales', 'webpack'); }); // Nginx @@ -186,7 +183,7 @@ gulp.task('test', callback => { // E2E tests gulp.task('e2e', callback => { - runSequence('docker', 'waitForMySQL', 'endToEndTests', callback); + runSequence('docker', 'waitForMySQL', 'run-e2e', callback); }); gulp.task('waitForMySQL', callback => { @@ -210,7 +207,7 @@ gulp.task('waitForMySQL', callback => { }, interval); }); -gulp.task('endToEndTests', callback => { +gulp.task('run-e2e', callback => { gulp.src('./e2e_tests.js') .pipe(jasmine({reporter: 'none'})); }); diff --git a/services/mailer/.gitignore b/services/mailer/.gitignore index 69d30d5cc..3c3629e64 100644 --- a/services/mailer/.gitignore +++ b/services/mailer/.gitignore @@ -1,5 +1 @@ node_modules -config.json -app.development.json -smtp.development.json -mysql.development.json diff --git a/services/print/.gitignore b/services/print/.gitignore index 69d30d5cc..3c3629e64 100644 --- a/services/print/.gitignore +++ b/services/print/.gitignore @@ -1,5 +1 @@ node_modules -config.json -app.development.json -smtp.development.json -mysql.development.json