gulp.task('critical', function () {
    critical.generateInline({
        // Your base directory
        base: 'views/dist/',

        // HTML source
        //html: '<html>...</html>',

        // HTML source file
        src: 'views/pizza.html',

        // Your CSS Files (optional)
        css: [src + 'views/css/style.css','views/css/bootstrap-grid.css'],

        // Viewport width
        width: 320,

        // Viewport height
        height: 480,

        // Target for final HTML output
        htmlTarget: 'pizza.html',

        // Target for generated critical-path CSS (which we inline)
        styleTarget: 'css/main.css',

        // Minify critical-path CSS when inlining
        minify: false,

        // Extract inlined styles from referenced stylesheets
        extract: true
    });
});
Exemplo n.º 2
0
gulp.task('critical', function () {
	critical.generateInline({
		base: config.dest,
		src: 'index.html',
		//dest: 'assets/css/critical.css',
		htmlTarget: 'index.html',
		minify: true,
		width: 1000,
		height: 768
	});
});
Exemplo n.º 3
0
gulp.task('critical-do', function () {
  critical.generateInline({
    base: 'dist/',
    src: 'index.html',
    styleTarget: 'styles/main.css',
    htmlTarget: 'index.html',
    width: 320,
    height: 480,
    minify: true
  });
});
Exemplo n.º 4
0
gulp.task('criticalcss', function () {
    critical.generateInline({
        src: 'index.html',
        styleTarget: './public/css/critical.css',
        htmlTarget: 'index.html',
        width: 600,
        height: 400,
        minify: true,
        ignore: ['@font-face']
    });
});
Exemplo n.º 5
0
gulp.task('deploy:critical', ['build'], function (done) {

    critical.generateInline({
        base: config.dest,
        src: 'index.html',
        // styleTarget: 'main.css',
        htmlTarget: 'index.html',
        minify: true
    }, done);

});
gulp.task('critical', function () {
    critical.generateInline({
        base: './',
        src: 'index.html',
        css: ['./css/style.css'],
        styleTarget: 'css/style.css',
        htmlTarget: 'index-critical.html',
        width: 320,
        height: 480,
        minify: true
    });
});
Exemplo n.º 7
0
gulp.task('critical', ['copystyles'], function () {
    critical.generateInline({
        base: '_site/',
        src: 'index.html',
        // css: ['_site/assets/css/myblog.css'],
        styleTarget: 'assets/css/main.css',
        htmlTarget: 'index.html',
        width: 1000,
        height: 1000,
        minify: true
    });
});
Exemplo n.º 8
0
gulp.task('critical', function(){
    critical.generateInline({
        base: './',
        src: 'index.html',
        // styleTarget: 'static/css/estilos.css',
        css: 'static/css/estilos.css',
        htmlTarget: 'index.html',
        minify: true,
        width : 1440,
        height : 700,
    });
});
Exemplo n.º 9
0
gulp.task('critical', function () {
  const dest = './public'

  return critical.generateInline({
    base: dest,
    src: 'index.html',
    styleTarget: 'app.css',
    htmlTarget: 'index.html',
    width: 320,
    height: 480,
    minify: true
  })
})
Exemplo n.º 10
0
var critical = require('critical');

critical.generateInline({
  // Your base directory
  base: '../8d1abeffe1/',

  // HTML source file
  src: 'index.src.html',

  // Viewport width
  width: 1024,

  // Viewport height
  height: 768,

  // Target for final HTML output
  htmlTarget: 'gen/index-critical.html',

  // Target for generated critical-path CSS (which we inline)
  styleTarget: 'gen/critical.css',

  // Minify critical-path CSS when inlining
  minify: true,

  // Extract inlined styles from referenced stylesheets
  extract: true
});