everyone. I have been learning Gulp 4 so far and I have two questions about it:
When I was reading articles about Gulp 4, I saw that functions are
exported (usually at the bottom of gulpfile.js file). For instance,
exports.style = style
. I would like to know what is it for and
whether it is obligatory or maybe it should be done in particular cases...
When I push my project to Github repo, I export only files in so-called "build" folder (where all optimized files are located) + index.html itself, don't I? Just need clarification.
Thank you for your replies!
gulp style
. However it is better to organise functions into tasks instead of exporting every single one unless you really want to execute them separately.gulpfile.js
, package.json
and package-lock.json
/ yarn.lock
and skip optimized files. If you are pushing it for deployment only, you obviously do not need source files or gulp-related files and can push optimized files only (although in this case, it is probably better to push everything and configure deployment to skip unnecessary files).