From 0bb91a14031cd76e21a869bcef49174f1e313ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Sun, 30 Sep 2018 22:50:48 +0200 Subject: [PATCH] library bundle --- {static => client}/lib/crafty-min.js | 0 {static => client}/lib/jquery-3.3.1.min.js | 0 gulpfile.js | 17 +++++++++++++---- static/index.html | 3 +-- 4 files changed, 14 insertions(+), 6 deletions(-) rename {static => client}/lib/crafty-min.js (100%) rename {static => client}/lib/jquery-3.3.1.min.js (100%) diff --git a/static/lib/crafty-min.js b/client/lib/crafty-min.js similarity index 100% rename from static/lib/crafty-min.js rename to client/lib/crafty-min.js diff --git a/static/lib/jquery-3.3.1.min.js b/client/lib/jquery-3.3.1.min.js similarity index 100% rename from static/lib/jquery-3.3.1.min.js rename to client/lib/jquery-3.3.1.min.js diff --git a/gulpfile.js b/gulpfile.js index 509c350..65c75a4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,12 +6,13 @@ var uglify = require('gulp-uglify-es').default; var concat = require('gulp-concat'); var paths = { - scripts: 'client/scripts/**/*.coffee', + coffee: 'client/scripts/**/*.coffee', + lib: 'client/lib/**/*.js', images: 'client/img/**/*' }; -gulp.task('js', function(){ - return gulp.src(paths.scripts) +gulp.task('coffee', function(){ + return gulp.src(paths.coffee) .pipe(sourcemaps.init()) .pipe(concat('app.min.js')) .pipe(coffee({bare: true})) @@ -23,4 +24,12 @@ gulp.task('js', function(){ .pipe(gulp.dest('static')) }); -gulp.task('default', [ 'js' ]); +gulp.task('lib', function(){ + return gulp.src(paths.lib) + .pipe(sourcemaps.init()) + .pipe(concat('lib.min.js')) + .pipe(sourcemaps.write()) + .pipe(gulp.dest('static')) +}); + +gulp.task('default', [ 'coffee', 'lib' ]); diff --git a/static/index.html b/static/index.html index 346c01a..9b7f452 100644 --- a/static/index.html +++ b/static/index.html @@ -5,8 +5,7 @@ - - +