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 git@github.com:meuspedidos/mp-components.git$ cd mp-components- Fire up
react-storybookusing$ npm run storybookthen 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 thestorybookapp and publish it toGH Pages
build: builds the distributable Node package inside thelibdirectorystorybook: starts React Storybook @ http://localhost:9001lint: lints bothjsandscssfileslint:js: lintsjsfiles onlylint:sass: lintsscssfiles onlygh-pages: builds a static version of storybook to be used in Github Pages inside the_gh-pagesdirversion:[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