Skip to content

Only the Grid from IBM/css-gridish as an NPM module.

License

Notifications You must be signed in to change notification settings

milewski/css-gridish-grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

css-gridish-grid

npm version npm downloads

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.

Install

npm install css-gridish-grid -D

Usage

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.

License

MIT © Rafael Milewski

Releases

No releases published

Packages

No packages published