diff --git a/.couchappignore b/.couchappignore index 30fd786..0c5548b 100644 --- a/.couchappignore +++ b/.couchappignore @@ -5,4 +5,5 @@ // ".*\\.swp$" // ".*\\.bak$" "node_modules$" + "gulp-tasks$" ] \ No newline at end of file diff --git a/_attachments/hProjektEdit.html b/_attachments/hProjektEdit.html index 5868622..b9c6e88 100644 --- a/_attachments/hProjektEdit.html +++ b/_attachments/hProjektEdit.html @@ -100,7 +100,8 @@

meldung

diff --git a/gulpfile.js b/gulpfile.js index a968dc8..84be5de 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,59 +1,20 @@ -/** - * Created by alex on 09.06.2014. - */ -var gulp = require('gulp'), - autoprefixer = require('gulp-autoprefixer'), - minifycss = require('gulp-minify-css'), - uglify = require('gulp-uglify'), - concat = require('gulp-concat'), - notify = require('gulp-notify'); - -gulp.task('prod', ['prod_style', 'prod_src_1', 'prod_src_2']); - -gulp.task('dev', ['dev_style', 'dev_src_1', 'dev_src_2']); +/* -gulp.task('prod_style', function() { - return gulp.src(['_attachments/style/jquery.mobile.css', '_attachments/style/themes/gruen.min.css', '_attachments/style/jquery.mobile.datebox.css', '_attachments/style/evab.css']) - .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 9', 'opera 12.1', 'ios 6', 'android 4')) - .pipe(minifycss()) - .pipe(concat('main.css')) - .pipe(gulp.dest('_attachments/style')) - .pipe(notify({message: 'prod_style task beendet'})); -}); + Quelle: https://github.com/greypants/gulp-starter -gulp.task('dev_style', function() { - return gulp.src(['_attachments/style/jquery.mobile.css', '_attachments/style/themes/gruen.min.css', '_attachments/style/jquery.mobile.datebox.css', '_attachments/style/evab.css']) - .pipe(concat('main.css')) - .pipe(gulp.dest('_attachments/style')) - .pipe(notify({message: 'dev_style task beendet'})); -}); + gulpfile.js + =========== + Rather than manage one giant configuration file responsible + for creating multiple tasks, each task has been broken out into + its own file in gulp/tasks. Any files in that directory get + automatically required below. -gulp.task('prod_src_1', function() { - return gulp.src(['vendor/couchapp/_attachments/jquery.mobile.js', 'vendor/couchapp/_attachments/jquery.mobile.datebox.js', 'vendor/couchapp/_attachments/jquery.form.js', 'vendor/couchapp/_attachments/jquery.couch.js', 'vendor/couchapp/_attachments/evab.js']) - .pipe(concat('main.js')) - .pipe(uglify()) - .pipe(gulp.dest('vendor/couchapp/_attachments')) - .pipe(notify({ message: 'prod_src_1 task beendet' })); -}); - -gulp.task('dev_src_1', function() { - return gulp.src(['vendor/couchapp/_attachments/jquery.mobile.js', 'vendor/couchapp/_attachments/jquery.mobile.datebox.js', 'vendor/couchapp/_attachments/jquery.form.js', 'vendor/couchapp/_attachments/jquery.couch.js', 'vendor/couchapp/_attachments/evab.js']) - .pipe(concat('main.js')) - .pipe(gulp.dest('vendor/couchapp/_attachments')) - .pipe(notify({ message: 'dev_src_1 task beendet' })); -}); + To add a new task, simply add a new task file that directory. + gulp/tasks/default.js specifies the default set of tasks to run + when you run `gulp`. + */ -gulp.task('prod_src_2', function() { - return gulp.src(['vendor/couchapp/_attachments/markerclusterer.js', 'vendor/couchapp/_attachments/markerwithlabel.js', 'vendor/couchapp/_attachments/underscore.js']) - .pipe(concat('main2.js')) - .pipe(uglify()) - .pipe(gulp.dest('vendor/couchapp/_attachments')) - .pipe(notify({ message: 'prod_src_2 task beendet' })); -}); +var gulp = require('gulp'); +var requireDir = require('require-dir'); -gulp.task('dev_src_2', function() { - return gulp.src(['vendor/couchapp/_attachments/markerclusterer.js', 'vendor/couchapp/_attachments/markerwithlabel.js', 'vendor/couchapp/_attachments/underscore.js']) - .pipe(concat('main2.js')) - .pipe(gulp.dest('vendor/couchapp/_attachments')) - .pipe(notify({ message: 'dev_src_2 task beendet' })); -}); \ No newline at end of file +requireDir('./gulp-tasks', {recurse: true}); \ No newline at end of file diff --git a/package.json b/package.json index 6b202b0..d0181e6 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,8 @@ "gulp-autoprefixer": "0.0.7", "gulp": "~3.7.0", "gulp-uglify": "~0.3.2", - "gulp-notify": "~1.3.1" + "gulp-notify": "~1.3.1", + "browserify": "~5.11.1", + "require-dir": "~0.1.0" } }