# To use component

'''
npm install --save react-modal-simple

import MenuIcon from 'common-react-components'
import 'common-react-components/dist/MenuIcon.css'

'''


## To run example demo locally 

- npm start

- localhost:3001


## To build and deply demo

1. To build dist of demo - npm run build

2. To deploy demo to ghpages - npm run deploy

OR

1. npm run publish-demo (combines above steps)


## To publish to npm again

1. Increment package version

2. npm publish

3. npm run publish-demo


## Resources

Step by step instruction to publish component to npm from scratch - 
https://medium.com/dailyjs/building-a-react-component-with-webpack-publish-to-npm-deploy-to-github-guide-6927f60b3220

Also, do the following -

1. Install prop-types as dev dependency - 
npm install prop-types -D

2. Install as dev dependency, to run es6.
npm install babel-preset-stage-2 -D

3. Update .babelrc config, add plugins

.babelrc
{
  "presets": ["env", "react"],
  "plugins":
	[
		"transform-object-rest-spread",
		"transform-class-properties",
	]
}

Note, for this repo -
Cannot publish to gh-pages since repo is private. Make it public to put on gh-pages.
