This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

standard

  • Loading branch information...
barbalex committed May 30, 2015
1 parent 1e77a8b commit 3fcde2bff87c9940d0245e97952797c5463dd14a
View
@@ -6,56 +6,55 @@
of browserify for faster bundling using caching.
*/
/*jslint node: true, browser: true, nomen: true, todo: true */
'use strict';
'use strict'
var browserify = require('browserify'),
watchify = require('watchify'),
bundleLogger = require('../vendor/couchapp/_attachments/util/bundleLogger'),
gulp = require('gulp'),
handleErrors = require('../vendor/couchapp/_attachments/util/handleErrors'),
source = require('vinyl-source-stream');
var browserify = require('browserify'),
watchify = require('watchify'),
bundleLogger = require('../vendor/couchapp/_attachments/util/bundleLogger'),
gulp = require('gulp'),
handleErrors = require('../vendor/couchapp/_attachments/util/handleErrors'),
source = require('vinyl-source-stream')
gulp.task('browserify', function () {
var bundler,
bundle;
bundler = browserify({
// Required watchify args
cache: {},
packageCache: {},
fullPaths: true,
// Specify the entry point of your app
entries: ['./vendor/couchapp/_attachments/evab.js'],
// Add file extentions to make optional in your requires
extensions: ['.js'],
// Enable source maps!
debug: true
});
bundle = function () {
// Log when bundling starts
bundleLogger.start();
return bundler
.bundle()
// Report compile errors
.on('error', handleErrors)
// Use vinyl-source-stream to make the
// stream gulp compatible. Specifiy the
// desired output filename here.
.pipe(source('app.js'))
// Specify the output destination
.pipe(gulp.dest('./vendor/couchapp/_attachments/'))
// Log when bundling completes!
.on('end', bundleLogger.end);
};
if (global.isWatching) {
bundler = watchify(bundler);
// Rebundle with watchify on changes.
bundler.on('update', bundle);
}
return bundle();
});
var bundler,
bundle
bundler = browserify({
// Required watchify args
cache: {},
packageCache: {},
fullPaths: true,
// Specify the entry point of your app
entries: ['./vendor/couchapp/_attachments/evab.js'],
// Add file extentions to make optional in your requires
extensions: ['.js'],
// Enable source maps!
debug: true
})
bundle = function () {
// Log when bundling starts
bundleLogger.start()
return bundler
.bundle()
// Report compile errors
.on('error', handleErrors)
// Use vinyl-source-stream to make the
// stream gulp compatible. Specifiy the
// desired output filename here.
.pipe(source('app.js'))
// Specify the output destination
.pipe(gulp.dest('./vendor/couchapp/_attachments/'))
// Log when bundling completes!
.on('end', bundleLogger.end)
}
if (global.isWatching) {
bundler = watchify(bundler)
// Rebundle with watchify on changes.
bundler.on('update', bundle)
}
return bundle()
})
@@ -1,16 +1,15 @@
/*jslint node: true, browser: true, nomen: true, todo: true */
'use strict';
'use strict'
var gulp = require('gulp'),
shell = require('gulp-shell'),
pass_file = require('../couchpass.json'),
user_name,
password,
request;
var gulp = require('gulp'),
shell = require('gulp-shell'),
pass_file = require('../couchpass.json'),
userName,
password,
request
user_name = pass_file.user;
password = pass_file.pass;
userName = pass_file.user
password = pass_file.pass
request = 'couchapp push http://' + user_name + ':' + password + '@127.0.0.1:5984/evab';
request = 'couchapp push http://' + userName + ':' + password + '@127.0.0.1:5984/evab'
return gulp.task('build_couchapp', shell.task([request]));
gulp.task('build_couchapp', shell.task([request]))
View
@@ -2,19 +2,18 @@
* Baut das Projekt für die Entwicklung
*/
/*jslint node: true, browser: true, nomen: true, todo: true */
'use strict';
'use strict'
var gulp = require('gulp'),
requireDir = require('require-dir'),
runSequence = require('run-sequence');
var gulp = require('gulp'),
requireDir = require('require-dir'),
runSequence = require('run-sequence')
requireDir('../gulp-tasks', {recurse: true});
requireDir('../gulp-tasks', {recurse: true})
return gulp.task('dev', function () {
runSequence(
'browserify',
['dev_style', 'dev_src_1', 'dev_src_2'],
'build_couchapp'
);
});
gulp.task('dev', function () {
runSequence(
'browserify',
['dev_style', 'dev_src_1', 'dev_src_2'],
'build_couchapp'
)
})
View
@@ -1,15 +1,14 @@
/*jslint node: true, browser: true, nomen: true, todo: true */
'use strict';
'use strict'
var gulp = require('gulp'),
requireDir = require('require-dir'),
runSequence = require('run-sequence');
var gulp = require('gulp'),
requireDir = require('require-dir'),
runSequence = require('run-sequence')
requireDir('../gulp-tasks', {recurse: true});
requireDir('../gulp-tasks', {recurse: true})
return gulp.task('dev_only_src', function () {
runSequence(
'browserify',
['dev_src_1', 'dev_src_2']
);
});
gulp.task('dev_only_src', function () {
runSequence(
'browserify',
['dev_src_1', 'dev_src_2']
)
})
View
@@ -1,19 +1,18 @@
/*jslint node: true, browser: true, nomen: true, todo: true */
'use strict';
'use strict'
var gulp = require('gulp'),
concat = require('gulp-concat'),
notify = require('gulp-notify');
var gulp = require('gulp'),
concat = require('gulp-concat'),
notify = require('gulp-notify')
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/app.js'
])
.pipe(concat('main.js'))
.pipe(gulp.dest('vendor/couchapp/_attachments'))
.pipe(notify({ message: 'dev_src_1 task beendet' }));
});
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/app.js'
])
.pipe(concat('main.js'))
.pipe(gulp.dest('vendor/couchapp/_attachments'))
.pipe(notify({ message: 'dev_src_1 task beendet' }))
})
View
@@ -1,17 +1,16 @@
/*jslint node: true, browser: true, nomen: true, todo: true */
'use strict';
'use strict'
var gulp = require('gulp'),
concat = require('gulp-concat'),
notify = require('gulp-notify');
var gulp = require('gulp'),
concat = require('gulp-concat'),
notify = require('gulp-notify')
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' }));
});
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' }))
})
View
@@ -1,18 +1,17 @@
/*jslint node: true, browser: true, nomen: true, todo: true */
'use strict';
'use strict'
var gulp = require('gulp'),
concat = require('gulp-concat'),
notify = require('gulp-notify');
var gulp = require('gulp'),
concat = require('gulp-concat'),
notify = require('gulp-notify')
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'}));
});
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'}))
})
View
@@ -1,14 +1,13 @@
/*jslint node: true, browser: true, nomen: true, todo: true */
'use strict';
'use strict'
var gulp = require('gulp'),
requireDir = require('require-dir'),
runSequence = require('run-sequence');
var gulp = require('gulp'),
requireDir = require('require-dir'),
runSequence = require('run-sequence')
requireDir('../gulp-tasks', {recurse: true});
requireDir('../gulp-tasks', { recurse: true })
return gulp.task('prod', function () {
runSequence(
['browserify', 'prod_style', 'prod_src_1', 'prod_src_2']
);
});
gulp.task('prod', function () {
runSequence(
['browserify', 'prod_style', 'prod_src_1', 'prod_src_2']
)
})
View
@@ -1,21 +1,20 @@
/*jslint node: true, browser: true, nomen: true, todo: true */
'use strict';
'use strict'
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
notify = require('gulp-notify');
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
notify = require('gulp-notify')
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/app.js'
])
.pipe(concat('main.js'))
.pipe(uglify())
.pipe(gulp.dest('vendor/couchapp/_attachments'))
.pipe(notify({ message: 'prod_src_1 task beendet' }));
});
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/app.js'
])
.pipe(concat('main.js'))
.pipe(uglify())
.pipe(gulp.dest('vendor/couchapp/_attachments'))
.pipe(notify({ message: 'prod_src_1 task beendet' }))
})
Oops, something went wrong.

0 comments on commit 3fcde2b

Please sign in to comment.