gulp.task("uglify", function () {

    gulp.src("static/js/setting.js")
        .pipe(uglify())
        .pipe(rename('setting.min.js'))
        .pipe(gulp.dest("build/js"))

    gulp.src("static/js/single.js")
        .pipe(uglify())
        .pipe(rename('single.min.js'))
        .pipe(gulp.dest("build/js"))

    gulp.src("static/js/page.js")
        .pipe(uglify())
        .pipe(rename('page.min.js'))
        .pipe(gulp.dest("build/js"))

    gulp.src("static/js/base.js")
        .pipe(uglify())
        .pipe(rename('base.min.js'))
        .pipe(gulp.dest("build/js"))  

    gulp.src("static/js/vue.min.js")
        .pipe(gulp.dest("build/js"))          
});
Beispiel #2
0
gulp.task( 'scripts', [ 'react' ], function() {
    // Copy over the source for the sourcemaps for a dev build
    // @TODO: should also copy over systemCommon files to be served also
    if ( args.d ) {
        gulp.src( './public/scripts/**/*.js' )
            .pipe( gulp.dest( path.join( build.target, 'public/public/scripts' ) ) ) ;
            gulp.src( './public/vendor/**/*.js' )
            .pipe( gulp.dest( path.join( build.target, 'public/public/vendor' ) ) ) ;
    }

    // Build common include files to allow systemjs builder to work
    gulp.src( build.systemCommon )
        .pipe( uglify( 'common.js', {
            mangle: !args.d,
            outSourceMap: !!args.d
        }))
        .pipe( gulp.dest( path.join( build.target, './public/scripts' ) ) );

    // Use systemjs builder to build the source
    return gulp.src( './public/scripts/main.js' )
        .pipe( plumber() )
        .pipe( builder({
            dest: path.join( build.target, './public/scripts' )
        }))
        .pipe( gulpif( !args.d, uglify() ) )
        .pipe( gulpif( !args.d, gulp.dest( path.join( build.target, './public/scripts' ) ) ) )
        .pipe( alert( 'Scripts built' ) )
        .pipe( livereload({
            auto: false
        }));
});
Beispiel #3
0
module.exports = function() {

  var browserified = transform(function(filename) {
    var b = browserify(filename, {
      standalone: 'qStringUtils'
      , bundleExternal: false
    })
    return b.bundle();
  });

  gulp.src(['./src/qstring.js'])
    .pipe(browserified)
    .pipe(uglify())
    .pipe(rename({
      extname: '.standalone.min.js'
    }))
    .pipe(gulp.dest('./'));

  gulp.src(['./src/qstring.js'])
    .pipe(gulp.dest('./'))
    .pipe(uglify())
    .pipe(rename({
      extname: '.min.js'
    }))
    .pipe(gulp.dest('./'));

}
Beispiel #4
0
gulp.task('app', ['examples'], function () {
	gulp.src('src/ix.co', {read: false})
		.pipe(browserify({standalone: "Ix", transform: ['cocoify'], extensions: ['.co']}))
		.pipe(uglify('ix.dev.js', {mangle: false, output: {beautify: true}, compress: false}))
		.pipe(gulp.dest('bin'))
		.pipe(uglify("ix.rel.js"))
		.pipe(gulp.dest('bin'));
});
Beispiel #5
0
gulp.task('uglify', function() {
  gulp.src('ekip/everykid/static/js/script.js')
    .pipe(uglify())
    .pipe(gulp.dest('ekip/everykid/static/js/min'));

  gulp.src('ekip/everykid/static/js/voucher.js')
    .pipe(uglify())
    .pipe(gulp.dest('ekip/everykid/static/js/min'));

});
Beispiel #6
0
gulp.task('js', ['lint'], function () {

  // Angular application source code
  var src = gulp.src(sources.js)
    .pipe(ngAnnotate());

  // Angular html templates
  var tpl = gulp.src(sources.tpl)
    .pipe(htmlmin())
    .pipe(templateCache());

  // Merge the two streams to create an unminified, concatenated build file
  var build = merge(src, tpl)
    // Ensure that the order in which we load files allows for angular modules
    // to be defined before accessing (downside to not using broserify)
    .pipe(angularFilesort())
    .pipe(uglify(dests.filenames.app, {
      mangle: false,
      output: {
        beautify: true
      },
      enclose: {
        "window": "window",
        "window.angular": "angular",
        "undefined": "undefined"
      }
    }));

  // Merge the two streams to create a minified build file
  var buildmini = merge(src, tpl)
    .pipe(angularFilesort())
    // Remove paths so that we can have the sourcemap point to a single dir
    .pipe(flatten())
    // Write out all raw source files into the dist dir (for sourcemaps)
    .pipe(gulp.dest(dests.build.js + '/sources'))
    // Minify and produce source maps
    .pipe(uglify(dests.filenames.appmin, {
      outSourceMap: true,
      basePath: 'dist/js',
      enclose: {
        "window": "window",
        "window.angular": "angular",
        "undefined": "undefined"
      }
    }));

  // Merged streams since we split them
  // and write both minified and unminified outputs
  return merge(build, buildmini)
    .pipe(size({
      showFiles: true
    }))
    .pipe(gulp.dest(dests.build.js));
});
Beispiel #7
0
gulp.task('uglify', function () {
	return es.merge([
		gulp.src('bower_components/angular/angular.min.js'),
		gulp.src('bower_components/angular-messages/angular-messages.min.js'),
		gulp.src('bower_components/angular-route/angular-route.min.js'),
		gulp.src('js/**/*.js').pipe(uglify()),
		gulp.src('lib/**/*.js').pipe(uglify())
	])
	.pipe(concat('all.min.js'))
	.pipe(gulp.dest('dist/js'));
});
Beispiel #8
0
gulp.task('compress', function(done) {
  gulp.src(paths.js)
      .pipe(uglify('app.js',{
        mangle:false,
        output: {
          beautify: true
        }
      }))
      .pipe(gulp.dest('./www/lib/'))
      .pipe(uglify('app.min.js',{
        mangle:false
      }))
      .pipe(gulp.dest('./www/lib/'))
      .on('end', done);
});
Beispiel #9
0
gulp.task('scripts', function() {
	console.log("Processing Javascript");
	gulp.src('app/js/custom/*.js')
	.pipe(jshint())
	.pipe(jshint.reporter('default'));
	gulp.src('app/js/+(vendor|foundation)/*.js')
	.pipe(uglify("jsdependencies.js").on('error', function(e) { console.log('\x07',e.message); return this.end(); }))
	.pipe(gulp.dest('build/'));
	gulp.src('app/js/custom/*.js')
	.pipe(uglify("app.js").on('error', function(e) { console.log('\x07',e.message); return this.end(); }))
	.pipe(gulp.dest('build/'))
	.on('end', function() {
		reload();
	});
});
Beispiel #10
0
gulp.task('default', function () {
    //Main library
    gulp.src(['bower_components/promise-polyfill/Promise.min.js', 'bower_components/webcomponents.js/CustomElements.min.js', 'bower_components/pixi/bin/pixi.min.js', 'demo/js/vendor/html2canvas.js', 'demo/js/vendor/velocity.js', 'src/util.js', 'src/gl-element-resolver.js', 'src/gl-context.js', 'src/images-loaded.js', 'src/gl-element.js'])
        .pipe(concat(BUNDLE_NAME + '.js'))
        .pipe(gulp.dest('dist'))
        .pipe(uglify(BUNDLE_NAME + '.min.js'))
        .pipe(gulp.dest('dist'));

    //Effects add-on
    gulp.src(['bower_components/tween.js/build/tween.min.js', 'src/effects/*.js', 'src/gl-effects-manager.js'])
        .pipe(concat(BUNDLE_NAME + '-effects.js'))
        .pipe(gulp.dest('dist'))
        .pipe(uglify(BUNDLE_NAME + '-effects.min.js'))
        .pipe(gulp.dest('dist'));
});
Beispiel #11
0
gulp.task('js-only', function(){
	gulp.src('source/js/*.js')
		.pipe(uglify('all.js', {
			outSourceMap: true
			}))
		.pipe(gulp.dest('public/js/all.js'));
});
Beispiel #12
0
 gulp.task(`build:js:${type}:min`, function () {
   return gulp.src(sourceFiles)
     .pipe(babel(config))
     .pipe(uglify())
     .pipe(rename(`Pool.${type}.min.js`))
     .pipe(gulp.dest('dist'));
 });
Beispiel #13
0
gulp.task('boot-lib', function(){
	gulp.src('dist/only-js/*.js')
		.pipe(uglify('all.js', {
			outSourceMap: true
			}))
		.pipe(gulp.dest('public/js/'));
});
gulp.task('js', function() {
    return gulp.src('js/*.js')
        .pipe(debug({ title: 'src' }))
        .pipe(uglify('production.min.js'))
        .pipe(gulp.dest('js/build'))
        .pipe(debug({ title: 'dest' }))
})
Beispiel #15
0
gulp.task('uglify', function() {
  return gulp.src('angular-rome.js')
    .pipe(uglify('angular-rome.min.js', {
      outSourceMap: true
    }))
    .pipe(gulp.dest('./'));
});
Beispiel #16
0
gulp.task('uglify', function() {
  return gulp.src(['js/vendor/superslides/*.js', 'js/vendor/hammer/*.js', 'js/vendor/owl-carousel/*.js', 'js/vendor/form-validator/*.js', 'js/vendor/select/*.js', 'js/vendor/progressBar/*.js', 'js/vendor/magnificPopup/*.js', 'js/modules/*.js'])
    .pipe(uglify('app.min.js', {
      outSourceMap: true
    }))
    .pipe(gulp.dest('js'));
});
gulp.task('scripts', ['clean'], function(){
    return gulp.src(paths.scripts)
        .pipe(uglify('app.min.js', {
            outSourceMap: true
        }))
        .pipe(gulp.dest('./Scripts/'));
});
Beispiel #18
0
gulp.task("minifyjs", function () {
    gulp.src("./async.js")
        .pipe(uglify("async.min.js", {
            outSourceMap: true
        }))
        .pipe(gulp.dest("./"));
});
Beispiel #19
0
gulp.task('scripts', function () {
  return  gulp.src('src/js/main.js') 
        .pipe(rigger()) 
        .pipe(uglify()) 
        .pipe(gulp.dest('app/js/'))
        .pipe(reload({stream: true}));
});
Beispiel #20
0
gulp.task('scripts', function() {
  gulp.src("src/ReactSoundcloud.js")
    .pipe(concat("ReactSoundcloud.min.js"))
    .pipe(babel())
    .pipe(uglify())
    .pipe(gulp.dest("dist"));
});
Beispiel #21
0
gulp.task('js', function() {
	gulp.src(scripts)
		.pipe(concat('underscore.ext.js'))
		.pipe(gulp.dest('./dist'))
		.pipe(uglify('underscore.ext.min.js'))
		.pipe(gulp.dest('./dist'))
})
Beispiel #22
0
gulp.task('js-lib', function(){
	gulp.src('dist/js/*.js')
		.pipe(uglify('complete.js', {
			outSourceMap: true
			}))
		.pipe(gulp.dest('public/js/'));
});
Beispiel #23
0
gulp.task('lib', function () {

	gulp.src([settings.source + '/lib/**/*.js'])
		.pipe(uglify('lib.min.js'))
		.pipe(gulp.dest(settings.build + '/js')); 

})
Beispiel #24
0
 return es.concat.apply(null, getFolders(config.js).map(function(folder) {
     return gulp.src(path.join(config.js, folder, '*.js'))
         .pipe(uglify()
             .on('error', gutil.log))
         .pipe(concat(folder + '.js'))
         .pipe(gulp.dest(config.build_js));
 }));
Beispiel #25
0
gulp.task('uglify', function () {
    return gulp.src(SRC)
        .pipe(uglify('libs.min.js', {
            compress: false,
        }))
        .pipe(gulp.dest(DIST_JS));
});
gulp.task('templates', function () {
    var angularTemplatecache = require('gulp-angular-templatecache');
    var htmlmin = require('gulp-htmlmin');
    var rename = require('gulp-rename');
    var uglifyjs = require('gulp-uglifyjs');
    var ngAnnotate = require('gulp-ng-annotate');

    return gulp.src(['src/**/*.html', '!src/index.html'])
        .pipe(htmlmin({
            removeComments: true,
            collapseWhitespace: true,
            conservativeCollapse: true,
            keepClosingSlash: true,
            caseSensitive: true
        }))
        .pipe(angularTemplatecache({
            root: null,
            module: 'sw.ui.md'
        }))
        .pipe(rename('swagger-ui-material.templates.js'))
        .pipe(gulp.dest('dist/scripts'))
        .pipe(ngAnnotate())
        .pipe(uglifyjs('swagger-ui-material.templates.min.js'))
        .pipe(gulp.dest('dist/scripts'));
});
Beispiel #27
0
gulp.task('bundle-minify', ['add-version-to-source-code'], function () {
  return gulp.src('versions/hydra.js')
    .pipe(uglify('hydra.min.js', {
      outSourceMap: true
    }))
    .pipe(gulp.dest('versions/'));
});
Beispiel #28
0
gulp.task('minify', function(){
  return gulp
    .src('computed.js')
    .pipe(uglify('computed.min.js'))
    .pipe(gulp.dest('.'))
  ;
});
Beispiel #29
0
gulp.task('vendor', function () {
  var vendors = gulp.src(sources.vendorjs)
    // Remove paths so that we can have the sourcemap point to a single dir
    .pipe(flatten())
    // Write out all raw source files into the dist dir (for sourcemaps)
    .pipe(gulp.dest(dests.build.jsorig))
    // Ensure that any input file is newer than the output combined first
    // gulp-newer, for combined files, requires up to point to the output file
    .pipe(newer([
      dests.build.js,
      dests.filenames.vendormin
    ].join('/')));

  var vendorraw = vendors
    .pipe(concat(dests.filenames.vendor));

  var vendormin = vendors
    // Minify
    .pipe(uglify(dests.filenames.vendormin, {
      outSourceMap: true,
      basePath: dests.build.js
    }));

  // Merge streams since we split them
  // and write both minified and unminified outputs
  return merge(vendorraw, vendormin)
    .pipe(size({
      showFiles: true
    }))
    .pipe(gulp.dest(dests.build.js));
});
gulp.task('scripts1', function() {
	require('fs').writeFile('dist/builddate.js', 'console.log("'+new Date()+'")');
	return gulp.src(scriptsToDo1)
	.pipe(plumber(plumberErrorHandler))
	.pipe(uglify('overlay-message.min.js', {outSourceMap: true}))
	.pipe(gulp.dest('dist'))
});