Gulpfile.js tailored to Flow Framework and Neos CMS project
Stolen files originaly created by jonnitto and carefully
packaged for your Flow Framework and Neos CMS project., (*1)
Installation
composer require --dev ttree/gulpfilejs
When the package is installed you can copy the templates files:, (*2)
cp -rT Build/Gulp/templates ./
Warning: Check the content of the templates
directory to not override
important stuffs on your distribution. Your are free to not use the provided templates
or customize them to match your own requirements. The following document is based on the
official templates., (*3)
Edit the package.json
in your distribution directory to match your requirements., (*4)
nvm use # to enable the correct
yarn install
yarn run tasks
You must see something like:, (*5)
[14:14:53] Tasks for ~/Sites/dev/www.domain.dev/Build/Gulp
[14:14:53] โโโ build Generates all Assets, Javascript and CSS files
[14:14:53] โ --b, --beautify โฆ Beautify and dont't compress files
[14:14:53] โ --d, --debug โฆ Files dont't get compressed and sourcemaps get genereated
[14:14:53] โ --m, --maps โฆ Write sourcemaps
[14:14:53] โโโ css Render CSS Files
[14:14:53] โ --b, --beautify โฆ Beautify and dont't compress files
[14:14:53] โ --d, --debug โฆ Files dont't get compressed and sourcemaps get genereated
[14:14:53] โ --m, --maps โฆ Write sourcemaps
[14:14:53] โโโฌ default Generates all Assets, Javascript and CSS files & watch them
[14:14:53] โ โ --b, --beautify โฆ Beautify and dont't compress files
[14:14:53] โ โ --d, --debug โฆ Files dont't get compressed and sourcemaps get genereated
[14:14:53] โ โ --m, --maps โฆ Write sourcemaps
[14:14:53] โ โโโฌ <series>
[14:14:53] โ โโโ build
[14:14:53] โ โโโ watch
[14:14:53] โโโ js Render Javascript Files
[14:14:53] โ --b, --beautify โฆ Beautify and dont't compress files
[14:14:53] โ --d, --debug โฆ Files dont't get compressed and sourcemaps get genereated
[14:14:53] โ --m, --maps โฆ Write sourcemaps
[14:14:53] โโโ jsLint Lint Javascript files
[14:14:53] โโโ optimizeImages Optimize images and overrite them in the public folder
[14:14:53] โโโฌ pipeline Build task for pipeline
[14:14:53] โ โโโฌ <series>
[14:14:53] โ โโโ build
[14:14:53] โ โโโ optimizeImages
[14:14:53] โโโ scss Render _all.scss and _allsub.scss Files
[14:14:53] โโโ sprite Create SVG Sprite
[14:14:53] โโโ watch Watch files and regenereate them
โจ Done in 5.61s.
Check jonnitto for more details informations., (*6)
Warning: This package currently don't support Babel, we opt to use Bublรฉ most of the time, maybe this can change in the future.
The original version from jonnitto support both Bublรฉ (default) and Babel., (*7)
Features
-
RollupJS (module bundler)
-
Bublรฉ (the blazing fast, batteries-included ES2015 compiler)
- PostCSS
- Browsersync
- Assets (JS/CSS) pre compression with Broetli and Zoepfli
- Gulp, Uglify, Image optimizations, SVG Sprites, ...
Configuration
You can read the default configuration in config.json
, if you need to override the configuration for a specific site package,
you can create a Gulp.json
in the Configuration
directory, like this:, (*8)
{
"root": {
"notifications": true
},
"browserSync": {
"enable": true,
"proxy": "https://www.domain.dev:8180"
},
"tasks": {
"compress": true
}
}
This configuration will enable system notification, browsersync and enable global compression of static assets (JS/CSS) with Broetli and Zoepfli., (*9)
Acknowledgments
All the hard work has been done by jonnitto, (*10)
Packaging and fork sponsored by ttree ltd - neos solution provider., (*11)
We try our best to craft this package with a lots of love, we are open to
sponsoring, support request, ... just contact us., (*12)
License
Licensed under MIT, see LICENSE, (*13)