mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-28 19:13:55 +01:00
Upgrade to gulp 4.0.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,4 +25,3 @@ build.properties
|
|||||||
|
|
||||||
# NPM
|
# NPM
|
||||||
node_modules
|
node_modules
|
||||||
package-lock.json
|
|
||||||
|
|||||||
29
gulpfile.js
29
gulpfile.js
@@ -1,7 +1,7 @@
|
|||||||
var gulp = require('gulp');
|
const { series, src, watch, dest} = require('gulp');
|
||||||
var del = require('del');
|
const del = require('del');
|
||||||
var uglify = require('gulp-uglify');
|
const uglify = require('gulp-uglify');
|
||||||
var concat = require('gulp-concat');
|
const concat = require('gulp-concat');
|
||||||
|
|
||||||
var paths = {
|
var paths = {
|
||||||
minified: 'contao-leaflet.js',
|
minified: 'contao-leaflet.js',
|
||||||
@@ -9,20 +9,19 @@ var paths = {
|
|||||||
dest: 'src/Bundle/Resources/public/js'
|
dest: 'src/Bundle/Resources/public/js'
|
||||||
};
|
};
|
||||||
|
|
||||||
gulp.task('clear', function() {
|
function cleanTask (cb) {
|
||||||
del([paths.dest + '/' + paths.minified]);
|
del([paths.dest + '/' + paths.minified]);
|
||||||
});
|
cb();
|
||||||
|
}
|
||||||
|
|
||||||
gulp.task('scripts', ['clear'], function() {
|
const buildTask = series(cleanTask, function (cb) {
|
||||||
return gulp.src(paths.scripts)
|
return src(paths.scripts)
|
||||||
.pipe(concat(paths.minified))
|
.pipe(concat(paths.minified))
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
.pipe(gulp.dest(paths.dest));
|
.pipe(dest(paths.dest));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
exports.clean = cleanTask;
|
||||||
gulp.task('default', ['scripts']);
|
exports.watch = watch(paths.scripts, buildTask);
|
||||||
|
exports.build = buildTask;
|
||||||
gulp.task('watch', function() {
|
exports.default = buildTask;
|
||||||
gulp.watch(paths.scripts, ['scripts']);
|
|
||||||
});
|
|
||||||
|
|||||||
3250
package-lock.json
generated
Normal file
3250
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,9 +5,10 @@
|
|||||||
"main": "gulpfile.js",
|
"main": "gulpfile.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"del": "^3.0.0",
|
"del": "^3.0.0",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^4.0.0",
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-cli": "^2.0.1",
|
||||||
"gulp-uglify": "^3.0.0"
|
"gulp-concat": "^2.6.1",
|
||||||
|
"gulp-uglify": "^3.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
"Maps"
|
"Maps"
|
||||||
],
|
],
|
||||||
"author": "netzmacht David Molineus",
|
"author": "netzmacht David Molineus",
|
||||||
"license": "LGPL-3.0",
|
"license": "LGPL-3.0-or-later",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/netzmacht/contao-leaflet-maps/issues"
|
"url": "https://github.com/netzmacht/contao-leaflet-maps/issues"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user