MOBILE-2597 gulp: Update gulp to v4

main
dpalou 2018-09-13 12:11:20 +02:00
parent e10e0de010
commit 3f0a063714
5 changed files with 2990 additions and 1877 deletions

View File

@ -157,7 +157,7 @@ function buildLangs(filenames, langPaths, buildDest, done) {
return path + language + '.json'; return path + language + '.json';
}); });
gulp.src(paths) gulp.src(paths, { allowEmpty: true })
.pipe(slash()) .pipe(slash())
.pipe(clipEmptyFiles()) .pipe(clipEmptyFiles())
.pipe(through(function(file) { .pipe(through(function(file) {
@ -220,16 +220,6 @@ var appLangFiles = ['ar.json', 'bg.json', 'ca.json', 'cs.json', 'da.json', 'de.j
config: './src/config.json', config: './src/config.json',
}; };
gulp.task('default', ['lang', 'config']);
gulp.task('watch', function() {
var langsPaths = paths.lang.map(function(path) {
return path + '*.json';
});
gulp.watch(langsPaths, { interval: 500 }, ['lang']);
gulp.watch(paths.config, { interval: 500 }, ['config']);
});
// Build the language files into a single file per language. // Build the language files into a single file per language.
gulp.task('lang', function(done) { gulp.task('lang', function(done) {
// Get filenames to know which languages are available. // Get filenames to know which languages are available.
@ -292,6 +282,16 @@ gulp.task('config', function(done) {
.on('end', done); .on('end', done);
}); });
gulp.task('default', gulp.parallel('lang', 'config'));
gulp.task('watch', function() {
var langsPaths = paths.lang.map(function(path) {
return path + '*.json';
});
gulp.watch(langsPaths, { interval: 500 }, gulp.parallel('lang'));
gulp.watch(paths.config, { interval: 500 }, gulp.parallel('config'));
});
var templatesSrc = [ var templatesSrc = [
'./src/components/**/*.html', './src/components/**/*.html',
'./src/core/**/components/**/*.html', './src/core/**/components/**/*.html',
@ -306,7 +306,7 @@ var templatesSrc = [
gulp.task('copy-component-templates', function(done) { gulp.task('copy-component-templates', function(done) {
deleteFolderRecursive(templatesDest); deleteFolderRecursive(templatesDest);
gulp.src(templatesSrc) gulp.src(templatesSrc, { allowEmpty: true })
.pipe(flatten()) .pipe(flatten())
.pipe(gulp.dest(templatesDest)) .pipe(gulp.dest(templatesDest))
.on('end', done); .on('end', done);

View File

@ -1,10 +1,10 @@
{ {
"name": "moodlemobile", "name": "moodlemobile",
"app_id": "com.moodle.moodlemobile",
"type": "ionic-angular",
"integrations": { "integrations": {
"cordova": {}, "cordova": {},
"gulp": {} "gulp": {}
}, },
"watchPatterns": [] "type": "ionic-angular",
} "watchPatterns": [],
"pro_id": "com.moodle.moodlemobile"
}

4825
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -93,11 +93,12 @@
"devDependencies": { "devDependencies": {
"@ionic/app-scripts": "3.1.9", "@ionic/app-scripts": "3.1.9",
"electron-rebuild": "^1.8.1", "electron-rebuild": "^1.8.1",
"gulp": "^3.9.1", "gulp": "^4.0.0",
"gulp-clip-empty-files": "^0.1.2", "gulp-clip-empty-files": "^0.1.2",
"gulp-flatten": "^0.4.0", "gulp-flatten": "^0.4.0",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"gulp-slash": "^1.1.3", "gulp-slash": "^1.1.3",
"gulp-util": "^3.0.8",
"node-loader": "^0.6.0", "node-loader": "^0.6.0",
"through": "^2.3.8", "through": "^2.3.8",
"typescript": "~2.6.2", "typescript": "~2.6.2",
@ -168,4 +169,4 @@
"confinement": "classic" "confinement": "classic"
} }
} }
} }

View File

@ -1,6 +1,11 @@
This files describes API changes in the Moodle Mobile app, This files describes API changes in the Moodle Mobile app,
information provided here is intended especially for developers. information provided here is intended especially for developers.
=== 3.6.0 ===
- gulp was updated to v4. In order for gulp to work, you need to install gulp-cli: npm install -g gulp-cli
It's also recommended to update ionic cli to v4, otherwise some errors could be raised while building: npm install -g ionic
=== 3.5.2 === === 3.5.2 ===
- CoreChartDirective changed from directive to component (CoreChartComponent) and the selector to use it changed from canvas[core-chart] to core-chart. - CoreChartDirective changed from directive to component (CoreChartComponent) and the selector to use it changed from canvas[core-chart] to core-chart.