Skip to content

Commit 11612fe

Browse files
authored
Merge pull request #34 from jesusarockias/master
gulp version upgraded
2 parents bb30011 + c3fd1e0 commit 11612fe

File tree

2 files changed

+18
-22
lines changed

2 files changed

+18
-22
lines changed

gulpfile.js

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var webpack = require("webpack");
88
var shelljs = global.shelljs = global.shelljs || require('shelljs');
99
var isReleaseBranch = /^((release\/|hotfix\/))/g.test(process.env.BRANCH_NAME);
1010

11-
gulp.task('create-locale', function () {
11+
gulp.task('create-locale', gulp.series(function () {
1212
var localeJson = glob.sync(__dirname + '/src/app/**/locale.json', {
1313
silent: true
1414
});
@@ -23,9 +23,9 @@ gulp.task('create-locale', function () {
2323
} else {
2424
fs.writeFileSync(__dirname + '/src/app/common/locale-string.ts', 'export let Locale: Object={};');
2525
}
26-
});
26+
}));
2727

28-
gulp.task('copy-source', function () {
28+
gulp.task('copy-source', gulp.series(function (done) {
2929
var localeJson = glob.sync(__dirname + '/src/app/**/*', {
3030
silent: true,
3131
ignore: ['/src/app/common/**/*.*', '/src/app/common']
@@ -41,45 +41,41 @@ gulp.task('copy-source', function () {
4141
}
4242
}
4343
}
44-
});
44+
done();
45+
}));
4546

46-
gulp.task('build', function (done) {
47+
gulp.task('build', gulp.series(function (done) {
4748
shelljs.exec('npm run build:prod', function (exitCode, error) {
4849
console.log(error);
4950
done(exitCode);
5051
});
5152
// runSequence('create-locale');
52-
});
53-
54-
gulp.task('serve', ['copy-source', 'styles-all'], function () {
55-
shelljs.exec('npm run start');
56-
});
57-
53+
}));
5854

59-
gulp.task('clear-all', function () {
55+
gulp.task('clear-all', gulp.series(function () {
6056
return gulp.src(['src/**/*.js.map', 'src/**/*.json', 'src/**/*.js', 'src/**/*.d.ts', 'src/**/*.ngfactory.ts', 'src/**/*.ngstyle.ts']).pipe(clean({
6157
force: true
6258
}));
63-
});
59+
}));
6460

65-
gulp.task('move', function (done) {
61+
gulp.task('move', gulp.series(function (done) {
6662
shelljs.cp('-rf', './OpenNewSamples/*', './output');
6763
var mainBundle = fs.readFileSync('./output/main.js', 'utf8');
6864
mainBundle = mainBundle.replace(/\(\/assets/g, '(./assets');
6965
fs.writeFileSync('./output/main.js', mainBundle, 'utf8');
7066
done();
71-
});
67+
}));
7268

73-
gulp.task('styles-replace', function (done) {
69+
gulp.task('styles-replace', gulp.series(function (done) {
7470
var nos = glob.sync('node_modules/@syncfusion/ej2/*.css');
7571
for (var j = 0; j < nos.length; j++) {
7672
var htmlfile = fs.readFileSync(nos[j], 'utf8');
7773
fs.writeFileSync('./src/styles/' + nos[j].split('/')[3], htmlfile, 'utf8');
7874
}
7975
done();
80-
});
76+
}));
8177

82-
gulp.task('SEO-changes', function () {
78+
gulp.task('SEO-changes', gulp.series(function () {
8379
var newWindowSamples = glob.sync('./OpenNewSamples/**/**/index.html');
8480
var samplsListJson = JSON.parse(fs.readFileSync('./sampleOrder.json'));
8581
var localCss = `<link href="../../styles/OpenNew.css" rel="stylesheet">`;
@@ -116,7 +112,7 @@ gulp.task('SEO-changes', function () {
116112
fs.writeFileSync(newWindowSamples[i], indexFile.replace('Essential JS 2', 'Essential Studio'), 'utf8');
117113
}
118114
}
119-
);
115+
));
120116

121117
function camelCase(str) {
122118
return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
@@ -125,7 +121,7 @@ function camelCase(str) {
125121
}
126122

127123

128-
gulp.task('create-sampleList', function () {
124+
gulp.task('create-sampleList', gulp.series(function () {
129125

130126
var newWindowSamples = glob.sync('./src/app/**/**.module.ts', {
131127
silent: true,
@@ -148,4 +144,4 @@ gulp.task('create-sampleList', function () {
148144
fs.writeFileSync(newWindowSamples[i].replace(`.module.ts`, 'sampleList'), sampleJson, 'utf8');
149145
}
150146
}
151-
);
147+
));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"@types/jasminewd2": "~2.0.3",
7676
"@types/node": "~8.9.4",
7777
"glob": "^7.1.6",
78-
"gulp": "^3.9.1",
78+
"gulp": "^4.0.2",
7979
"shelljs": "^0.8.1",
8080
"codelyzer": "~4.3.0",
8181
"jasmine-core": "~2.99.1",

0 commit comments

Comments
 (0)