2.0.1 • Published 7 years ago
chirashi-loader v2.0.1
chirashi-loader
Installation
Install using npm:
npm i -D chirashi-loader
Update your Webpack config to match the following
{
test: /\.js$/,
loader: 'babel!chirashi',
include: projectRoot,
exclude: /node_modules\/(?!chirashi).+/
}
Enjoy chirashi's modularity !
import { addClass, on } from 'chirashi'
let sashimies = addClass('.sashimi', 'salmon')
on(sashimies, {
click(event) {
addClass(event.currentTarget, 'soy-sauce')
}
})
In this example, chirashi-loader
will allow to generate a custom build on the fly featuring only the needed files.