This repo is a gulp starter for this CSS Tricks tutorial.
Remember to do run the npm install
command after cloning this repo :)
Gulp starter for CSS Tricks article
`/gulpfile.js:92
runSequence(['sass', 'browserSync'] 'watch',
^
SyntaxError: missing ) after argument list
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
at Liftoff. (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:192:16)
at module.exports (/usr/local/lib/node_modules/gulp/node_modules/flagged-respawn/index.js:17:3)`
I'd like to use this for a project, but I can't get it to deliver anything besides the root index.html to /dist.
I'll eventually have something like ...
/index.html
/foo/index.html
/foo/subfoo1/index.html
/foo/subfoo2/index.html
/foo/subfoo2/index.html
/foo2/index.html
as the file directory for a super dumb static HTML website I have to build.
But your gulp file doesn't read all of that.
Can you help with a fix?
Thanks!
When I run gulp clean
it gives me the following error:
TypeError: del.sync(...).then is not a function at Gulp.<anonymous> (F:\UEM\dev\ureckon19-website - Copy\gulpfile.js:85:27) at module.exports (F:\UEM\dev\ureckon19-website - Copy\node_modules\orchestrator\lib\runTask.js:34:7) at Gulp.Orchestrator._runTask (F:\UEM\dev\ureckon19-website - Copy\node_modules\orchestrator\index.js:273:3) at Gulp.Orchestrator._runStep (F:\UEM\dev\ureckon19-website - Copy\node_modules\orchestrator\index.js:214:10) at Gulp.Orchestrator.start (F:\UEM\dev\ureckon19-website - Copy\node_modules\orchestrator\index.js:134:8) at C:\Users\farhana\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:20 at process._tickCallback (internal/process/next_tick.js:61:11) at Function.Module.runMain (internal/modules/cjs/loader.js:744:11) at startup (internal/bootstrap/node.js:285:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
Although it returns an error yet the dist
folder is deleted.
The css files must be there before 'useref' task begin to run.
Create a file "npm-shrinkwrap.json" and place it together in one directory with package.json.
{
"dependencies": {
"graceful-fs": {
"version": "4.2.2"
}
}
}
This will fix the error
Hello,
This repo is really awesome.
Just a few questions :
Gulp seems to not compress the images at all, as the size is exactly the same in the dist image folder.
when uploading on firebase I have a Warning: advanced compression encodings unavailable without ES6/C++11. Falling back to gzip. What should I add in gulp ?
Thanks
Great article at ccs-tricks, thank you!
I'm running into a problem when running gulp useref with the following code:
gulp.task('useref', function() {
var assets = useref.assets();
return gulp.src('app/*.html')
.pipe(assets)
.pipe(assets.restore())
.pipe(useref())
.pipe(gulp.dest('dist'));
});
I get the following error:
Using gulpfile ~/Documents/project/gulpfile.js Starting 'useref'... 'useref' errored after 224 μs TypeError: useref.assets is not a function
Any help/advice would be very welcome!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.