0.1.8 • Published 5 years ago
react-simple-library-template v0.1.8
Simple React Library Template
File Structure
NPM Publish
Component Dev
Install dependencies:
npm i npm start
Package components
npm run build
Local Test
Root dir:
npm link cd src/example npm link react-simple-library-template
Edit example/src/app.js file(replace the one you want to test):
// import { DemoButton1 } from '../../src' import { DemoButton1 } from 'react-simple-library-template'; import 'react-simple-library-template/lib/main.min.css'; // css
Root dir:
npm start
Publish to npm
Check npm config:
npm config list
Change origin:
npm config set registry http://registry.npmjs.org
publish to npm:
npm run pub # same above npm build npm publish
unpublish:
npm unpublish react-simple-library-template --force # replace with you npm lib name
npm install
Download:
npm i react-simple-library-template
Use:
# ES6 import import { DemoButton1 } from 'react-simple-library-template'; # if use css. import 'react-simple-library-template/lib/main.min.css';