Adds Twig support to the HTML task.
Basic use: in task-config.js, set html.templateLanguage to twig.
html : {
templateLanguage: 'twig',
},Advanced use: pass gulp-twig options in task-config.js's html.twig
html: {
templateLanguage: 'twig',
twig: {…},
},- Adds YAML support to the HTML task. Just give your YAML
dataFilethe extension.yamlor.yml.
- Adds PostCSS support
- Autoprefixer replaces gulp-autoprefixer
- cssnano replaces gulp-cssnano
Users can configure plugins and options in task-config.js's stylesheets.postcss. See gulp-postcss for more info.
Basic usage is unchanged. Source stylesheets will be preprocessed with Sass unless stylesheets.sass is false. You can still call out Sass explicitly if you like:
// in task-config.js
stylesheets: trueA task-config with custom PostCSS will look like this
// task-config.js
// must also add the dependencies (`(npm i|yarn add) some-plugin some-option`)
var somePlugin = require('some-plugin')
var someOption = require('some-option')
var postCssPlugins = [somePlugin()]
var postCssOptions = {someOption}
module.exports = {
// ...
stylesheets: {
// sass: true is implied
postcss: {
plugins: postCssPlugins,
options: postCssOptions
}
}
// ...
}Autoprefixer and cssnano are injected into the PostCSS plugins list, and do not need to be specified. However custom Autoprefixer and/or cssnano configs are respected if provided. That looks like this:
// task-config.js
// must also add the autoprefixer dependency (`(npm i|yarn add) autoprefixer`)
var autoprefixer = require('autoprefixer')
var postCssPlugins = [
autoprefixer({
grid: "autoplace"
})
]
module.exports = {
// ...
stylesheets: {
// sass: true is implied
postcss: {
plugins: postCssPlugins
}
}
// ...
}Recommended security-focused upgrade:
- Dependency updates to resolve security warnings and resolve deprecation warnings.
- Superficial breaking change: the
es2015Babel preset is no longer supported in thetask-config.jsjavascripttask. Replacees2015withenv. (#573 for more information.) - Documentation updates
- relatively references directories and files within init task
- hotfix: ensures new
fancy-logpackage does not break tasks
- Prevent browserSync.server.middleware from being overwritten completely
- reorganizes production and replace file tasks to ensure public directory is cleaned on build task
- replaces outdated gulp-util with appropriate packages
- Hotfix for HTTP/2 upgrade task
- Adds an HTTP/2 assets upgrade by running
yarn run blendid -- http2-upgrade - Updates extras to include HTTP/2 init files
- Update dependencies, including Webpack 3
- Adds Drupal init task
- Readme updates
- Allow manually specifying the files that the
cleantask will delete via aclean.patternsoption
- Add
devtool,uglifyJsPlugin, anddefinePluginenvironment options - Autoset
uglifyJsPlugin.sourceMaptotrueifproduction.devtoolis defined - Add
publicPathto Craft task-config.js #432
- add watchOptions to browserSync config #429
- Gulp Starter is now Blendid!
- Now a standalone yarn/npm installable module 🎉
- Tasks and modules are fully configurable through task-config.js
- Paths are fully configuraable through path-config.json
- Update all dependencies to latest, including Webpack 2
- HTML and CSS tasks can be swapped out with alternative custom tasks
- Changed default Sass files from
.sassto.scss😭 - Custom gulp tasks can be added and run prebuild, postbuild, in development or production builds
- Renames javascripts
entriesoption toentryto match Webpack config - Removes Karma, Mocha, Sinon, Chai Test Suite. Jest is better and easy to set up. Use that instead.
inittask generates default config files and folder structureinit-craftandinit-railstasks generate config files, helpers, and asset folder structures for their environments.- So much more... see the README
- In task-config.js,
javascripts.entrieswas renamedjavascript.entryto be consistent with Webpack. - You are no longer requried to provide
extensionsin each task config, or really any non-default configuration. If you want to use default settings in any task configuration, simply set the value totrue. If you pass a configuration object, those settings will be merged with the defaults. - Check the README for other new configuration options.
This was the previous iteration of this project. Gulp Starter was not an installable package, and was more of an example starter kit that you could fork, clone, and copy into your project. The last iteration of this work is archived in the gulp-starter branch of this repo.
See the blog post that started it all: https://www.viget.com/articles/gulp-browserify-starter-faq