2.0.1 • Published 7 years ago

chirashi-loader v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

chirashi-loader

npm version Standard - JavaScript Style Guide Code Climate Issue Count Test Coverage Build Status

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.