common-react-components v0.0.74
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
To build dist of demo - npm run build
To deploy demo to ghpages - npm run deploy
OR
- npm run publish-demo (combines above steps)
To publish to npm again
Increment package version
npm publish
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 -
Install prop-types as dev dependency - npm install prop-types -D
Install as dev dependency, to run es6. npm install babel-preset-stage-2 -D
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.
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago