Gulp bugs
This commit is contained in:
parent
fda8750304
commit
ca0731714a
25
gulpfile.js
25
gulpfile.js
|
@ -77,9 +77,17 @@ gulp.task('e2e-run', () => {
|
|||
|
||||
gulp.task('clean', () => {
|
||||
const del = require('del');
|
||||
return del([`${buildDir}/*`, `!${buildDir}/templates`, `!${buildDir}/images`], {force: true});
|
||||
const files = [
|
||||
`${buildDir}/*`,
|
||||
`!${buildDir}/templates`,
|
||||
`!${buildDir}/images`,
|
||||
`docker-compose.yml`
|
||||
];
|
||||
return del(files, {force: true});
|
||||
});
|
||||
|
||||
gulp.task('i', ['install']);
|
||||
|
||||
gulp.task('install', () => {
|
||||
const install = require('gulp-install');
|
||||
let jsonFile = [];
|
||||
|
@ -97,9 +105,6 @@ gulp.task('install', () => {
|
|||
}));
|
||||
});
|
||||
|
||||
// Gulp install alias
|
||||
gulp.task('i', ['install']);
|
||||
|
||||
// Deployment
|
||||
|
||||
gulp.task('build', ['clean'], () => {
|
||||
|
@ -186,9 +191,8 @@ gulp.task('nginx-stop', ['nginx-conf'], async () => {
|
|||
gulp.task('nginx-conf', async () => {
|
||||
const mustache = require('mustache');
|
||||
|
||||
if (!fs.existsSync(nginxTemp)) {
|
||||
fs.mkdirSync(nginxTemp);
|
||||
}
|
||||
if (!await fs.exists(nginxTemp))
|
||||
await fs.mkdir(nginxTemp);
|
||||
|
||||
let params = {
|
||||
services: await getServices(),
|
||||
|
@ -215,11 +219,8 @@ gulp.task('nginx-clean', () => {
|
|||
return del([`${nginxTemp}/*`], {force: true});
|
||||
});
|
||||
|
||||
let services;
|
||||
|
||||
async function getServices() {
|
||||
if (services) return services;
|
||||
|
||||
let services;
|
||||
let startPort = defaultPort + 1;
|
||||
services = [];
|
||||
|
||||
|
@ -285,7 +286,7 @@ gulp.task('webpack-dev-server', function() {
|
|||
|
||||
// Locale
|
||||
|
||||
let localeFiles = `${srcDir}/**/locale/*.json`;
|
||||
let localeFiles = `${srcDir}/**/locale/*.yml`;
|
||||
|
||||
gulp.task('locales', function() {
|
||||
const extend = require('gulp-extend');
|
||||
|
|
Loading…
Reference in New Issue