mp-components
is a pack of React components originally created for Meus Pedidos, an online sales force solution.
- Setup Meus Pedidos' NPM credentials using only the first part of this step-by-step
$ git clone [email protected]:meuspedidos/mp-components.git
$ cd mp-components
- Fire up
react-storybook
using$ npm run storybook
then navigate to http://0.0.0.0:9001 - Hack away then commit your changes + PR to
master
- Checkout
master
- Add your changes to
CHANGELOG.md
, but DO NOT COMMIT - Run the following command using ONE of the options (patch, minor, major) according to the kind of changes you just made:
$ npm run version:[patch, minor, major]
. This command will bump the package version, create a new commit, a new tag, generate a new build, publish the new files tonpmjs.com
, build thestorybook
app and publish it toGH Pages
build
: builds the distributable Node package inside thelib
directorystorybook
: starts React Storybook @ http://localhost:9001lint
: lints bothjs
andscss
fileslint:js
: lintsjs
files onlylint:sass
: lintsscss
files onlygh-pages
: builds a static version of storybook to be used in Github Pages inside the_gh-pages
dirversion:[patch, minor, major]
: ships everything (Github, NPM and Github Pages)
$ npm i react react-dom mp-components -D
$ npm i mp-components -D
- In your React component
import React, { Component } from 'react'
import { Button } from 'react-components'
import 'node_modules/mp-components/lib/css/Button.css'
export default class App extends Component {
render() {
return (
<Button>Press me!</Button>
)
}
}
MIT