Aviate
Small WebPack based SCSS / Javascript compiler
Installation
Install the package
npm install --save aviate
Open package.json
and add:
{
"scripts": {
"dev": "aviate",
"build": "aviate build"
}
}
Create the aviate.config.js
Configuration file
Aviate is configured using the aviate.config.js
file at the root of your project.
const path = require('path')
module.exports = {
host: 'http://localhost:8080/',
externalHost: '<url of docker container>',
distLocations: [
path.join(__dirname, 'your/production/assets/directory')
],
svgSprite: '**/*.svg',
postCss(loader, defaultPlugins) {
const plugins = defaultPlugins({
})
plugins.push(require('css-mqpacker')())
return plugins
}
decorateConfig(config) {
config.entry = Object.assign({}, config.entry, {
'styles': [
path.join(__dirname, 'web/app/themes/wecustom/assets/styles/main.scss')
],
'javascript': [
path.join(__dirname, 'web/app/themes/wecustom/assets/javascript/main.js')
],
})
return config
}
}
PostCSS plugins
These plugins are included by default: