This package is a standalone version of the grid provided as an chrome extension by: https://github.com/IBM/css-gridish/ the purpose of this lib is to make the local development easier by having the grid packed locally in your project, so anyone in the team can preview without any further installation.
npm install css-gridish-grid -D
Recommended usage:
If you are using webpack or rollup for instance, you can wrap your code inside a if(TRUE|FALSE) {}
block and get the grid automatically striped out from production build using tree-shaking
import Gridish from 'css-gridish-grid'
if (process.env.DEBUG) {
const grid = new Gridish( require('../css-gridish.json') )
grid.init()
//grid.destroy()
}
A sample of the options that can be given on the constructor can be found in here: https://github.com/IBM/css-gridish/blob/master/examples/material/css-gridish.json
The init()
and destroy()
methods are for easier hookups in a HOT-MODULE-RELOAD environment, this gives you the ability to dispose the grid whenever appropriated.