JeremieLitzler / mws-restaurant-stage-2

Starter Code for the Udacity's "Mobile Web Specialist Restaurant Reviews App: Stage 2" Project
https://resto-reviews.puzzlout.com
GNU General Public License v3.0
0 stars 0 forks source link

Implement Critical path for CSS #8

Open JeremieLitzler opened 6 years ago

JeremieLitzler commented 6 years ago

https://github.com/addyosmani/critical

or

https://www.npmjs.com/package/postcss-critical-split

JeremieLitzler commented 6 years ago
gulp.task("critical-css", ["optim-css"], function() {
    critical
        .generate({
            inline: true,
            base: "./build",
            src: "index.html",
            dest: "index.html",
            minify: true,
            width: 320,
            height: 480
        })
        .catch(err => {
            console.error("gulp task critical failed", err);
        });
});

Netlify says this about this task:

9:12:46 AM: gulp task critical failed { Error: ENOENT: no such file or directory, open 'build/index.html' 9:12:46 AM: errno: -2, 9:12:46 AM: code: 'ENOENT', 9:12:46 AM: syscall: 'open', 9:12:46 AM: path: 'build/index.html' }

You need to fix this.

JeremieLitzler commented 6 years ago

Also I see a http/404 on css/goo : what is that ?