Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

starterkit 1.0.3

Compare
Choose a tag to compare
@carloscuesta carloscuesta released this 17 Oct 09:27
· 129 commits to master since this release
Gulp

gulp critical: This task extracts & inlines critical-path (above-the-fold) CSS from HTML using critical.

gulp.task('critical', function () {
    return gulp.src(routes.files.htmlFiles)
        .pipe(critical({
            base: baseDirs.dist,
            inline: true,
            html: routes.files.htmlFiles,
            css: routes.files.styleCss,
            ignore: ['@font-face',/url\(/],
            width: 1300,
            height: 900
        }))
        .pipe(plumber({
            errorHandler: notify.onError({
                title: "Error: Critical failed.",
                message:"<%= error.message %>"
            })
        }))
        .pipe(gulp.dest(baseDirs.dist))
        .pipe(notify({
            title: 'Critical Path completed!',
            message: 'css critical path done!'
        }));
});

Added critical to optimize task.

Created a baseDirs object to define the baseDirs of the project.

var baseDirs = {
    dist:'dist/',
    src:'src/',
    assets: 'dist/assets/'
};
Package

Updated dependencies:

  • gulp-autoprefixer@3.0.2 -> 3.1.0
  • gulp babel@5.2.1 -> 5.3.0