gulp.task('vulcanize', function () {
  return gulp.src(config.paths.dist + '/elements/elements.html')
    .pipe(vulcanize({
      inlineScripts: true
    }))
    .pipe(crisper())
    .pipe(gulp.dest(config.paths.dist + '/elements'));
});
gulp.task('vulcanize', function () {
    return gulp.src('app/html/elements.html')
        .pipe(plumber())
        .pipe(vulcanize({
            inlineScripts: true,
            inlineCss: true,
            stripExcludes: false,
            excludes: ['//fonts.googleapis.com/*']
        }))
        .pipe(crisper())
        .pipe(gulp.dest('dist/html'));
});
Example #3
0
gulp.task('vulcanize_tagihan', function() {
	gulp.src('build_tagihan.html')
		.pipe(vulcanize({
			inlineCss: true,
			inlineScripts: true,
			stripComments: true
		}))
		.on('error', console.error.bind(console))
		.pipe(rename('tagihan.html'))
		.pipe(crisper())
		.pipe(gulp.dest('../cordova/www'))
})
Example #4
0
gulp.task('build', function(){
  return gulp.src('app/elements/elements.html')
             .pipe(vulcanize({
               stripComments: true,
               inlineScripts: true,
               inlineCss: true
             }))
             .pipe(
               crisper()
             )
             .pipe(
               gulp.dest('dist/elements')
             )
});
Example #5
0
gulp.task('crisp', function() {
  return gulp.src(['*.es6.{js,html}'])
  .pipe(gulpIf('*.html', rename(function(opt) {
     opt.basename = opt.basename.replace(/(.es6)/ig, '');
     return opt;
   })))
   .pipe(sourcemaps.init())
   .pipe(gulpIf('*.html', crisper({scriptInHead: false}))) // Extract JS from .html files
   .pipe(sourcemaps.write('.'))
   .pipe(gulpIf('*.js', rename(function(opt) {
      opt.basename = opt.basename.replace(/(.es6)/ig, '');
      opt.basename += '.es6'
      return opt;
    })))
   .pipe(gulp.dest('./'));
});
gulp.task('vulcanize', function () {
	return gulp.src(appDir + '/index.html')

	.pipe(vulcanize({
			strip: true,
			inlineScripts: true,
			inlineCss: true,
			// stripExcludes: false,
			stripComments: true
		}))
		.pipe(crisper({
			scriptInHead: false, // true is default
			onlySplit: false
		}))
		.pipe(gulp.dest(vulcanizedTmp));
});
Example #7
0
gulp.task('vul', function () {
    return gulp.src(['bower_components/codelabs/home_imports.html',
                     'bower_components/codelabs/editor_imports.html',
                     'bower_components/codelabs/citi-doc-viewer.html',
                     'bower_components/codelabs/citi-doc-home-page.html',
                     'bower_components/codelabs/citi-doc-editor.html',
                     'bower_components/codelabs/index.html'])
                     .pipe(vulcanize({
                    	 abspath: '',
                    	 excludes: [],
                    	 stripExcludes: false,
                    	 stripComments: true,
                    	 inlineScript: true
                    	 
                     })).pipe(crisper()).on("error", errorAlert).pipe(gulp.dest('bower_components/dist/codelabs'));
});
Example #8
0
gulp.task('vulcanize', function() {
  return gulp.src('war/components/elements.html')
    .pipe(vulcanize({
      abspath: '',
      excludes: [],
      stripExcludes: false,
      inlineScripts: true,
      inlineCss: true,
      stripComments: true
    }))
    //.pipe($.rename('elements.vulcanized.html'))
    .pipe(crisper({
      scriptInHead: false, // true is default 
      onlySplit: false
    }))
    .pipe(gulp.dest('war/components/vulcanized'));
});
gulp.task('vulcanize','Minify Polymer Elements into a index.html and index.js on the build folder.', function () {
    return gulp.src('source/index.html')
        .pipe(vulcanize({
            abspath: '',
            excludes: [],
            stripExcludes: false,
            inlineScripts: false
        }))
        .on( "error", function( err ) {
            console.log( err );
        })
        .pipe(crisper({
            scriptInHead: false, 
            onlySplit: false
        }))
        .pipe(gulp.dest(buildFolder));
});
Example #10
0
function build(dest) {
    dest = dest || "build";
    return gulp.src("index.html")
        .pipe(vulcanize({
            inlineScripts: true,
            inlineCss: true,
            excludes: [
                "overrides.css",
                "cordova.js"
            ]
        }))
        .pipe(insertLines({
            "after": /<head>/i,
            "lineAfter": "<meta http-equiv=\"Content-Security-Policy\"" +
            " content=\"default-src 'self' gap:; style-src 'self'" +
            " 'unsafe-inline'; connect-src https://*\">"
        }))
        .pipe(crisper())
        .pipe(gulp.dest(dest));
}
Example #11
0
gulp.task('vulcanize', function() {
  var DEST_DIR = dist('elements');
  return gulp.src(dist('elements/elements.vulcanized.html'))
    .pipe($.vulcanize({
      stripComments: true,
      inlineCss: true,
      inlineScripts: true
    }))
    // DANGER DANGER DANGER
    // FOR Polymer-ts to work with polymer
    // Inside a chrome app, we MUST
    // have vulcanize INLINE scripts
    // Then use crisper to yank them all out again
    // Otherwise it will NOT work!!!
    .pipe(crisper())
    .pipe(gulp.dest(DEST_DIR))
    .pipe($.size({
      title: 'vulcanize'
    }));
});
Example #12
0
gulp.task('vulcanize', function(){
    return gulp.src('src/components/cic-main/element.html')
        .pipe(vulcanizeWrapper())
        .pipe(crisper())
        .pipe(gulp.dest('build/components/cic-main'))
});