@networkteam/gulpfile
@networkteam/gulpfile is a so called hard-fork of the public package gulpfile.js by jonnitto .
The main reason behind this kind of fork is the way we want to use this package. It is inspired by the package.json of create-react-app.
Usage
Make sure Node installed. I recommend using NVM to manage versions.
Install Dependencies
If you use this library the first time, you need to be shure all global dependencies are installed correctly:
brew update
brew install yarn
gem install scss_lint
If the global dependencies are installed, you can install the rest with yarn
.
Run Gulp
If you have gulp installed globally, you can simple run gulp
, optional with some flags. With gulp -T
you can print out all the options.
If there's a global gulp in a different version, you have to use this commands:
Command | Watcher | Behaviour |
---|
yarn start | x | Generates all Assets, Javascript and CSS files |
yarn run tasks | | Show all available tasks |
yarn run beautify | x | Beautify and dont't compress files |
yarn run debug | x | Files dont't get compressed and sourcemaps get genereated |
yarn run maps | x | Write sourcemaps |
yarn run build | | Runs the build process for production |
yarn run css | | Render CSS Files |
yarn run scss | | Render _all.scss and _allsub.scss Files |
yarn run js | | Render Javascript Files |
yarn run images | | Optimize images and overrite them in the source folder |
Overview
You can configure the behaviour with the gulp.json
in the root folder. To turn of a certain task, for example, just do it like this:
{
"tasks": {
"js": false
}
}
Take a look into config.json
the figure out which options are available. The script loads also the informations (description
, author
and homepage
entry) from composer.json
CSS
SCSS
These small helpers can make your developer life much easier. These files get filled automatically by the gulp task scss
Filename | Description |
---|
_all.scss | Every file from the same directory get an @import statement. Files with beginning underscore (_ ) get ignored. |
_allsub.scss | Every file from sub directories an @import statement. Files and folders with beginning underscore (_ ) get ignored. |
PostCSS
Following plugins are included:
Plugins for Editors
Package | Command |
---|
ScssLint | apm install linter-scss-lint |
ESLint | apm install linter-eslint |
Fusion | apm install language-typoscript2 |
Releasing
Create a new version with npm version ...
, e.g. for a patch release:
npm version patch
This will automatically push the tags to the repository and trigger a release to the NPM registry via a Travis CI build.
License
Licensed under MIT, see LICENSE