This repository has been archived by the owner on Sep 15, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Gabriel
committed
Sep 10, 2014
1 parent
3a255e7
commit e4d500b
Showing
4 changed files
with
21 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ | |
// ".*\\.swp$" | ||
// ".*\\.bak$" | ||
"node_modules$" | ||
"gulp-tasks$" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' })); | ||
}); | ||
requireDir('./gulp-tasks', {recurse: true}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters