Skip to content

Latest commit

 

History

History
80 lines (64 loc) · 2.71 KB

CONTRIBUTING.md

File metadata and controls

80 lines (64 loc) · 2.71 KB

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature

Remember that we have a pre-push hook with steps that analyzes and prevents mistakes.

After your pull request is merged, you can safely delete your branch.

Folders and Files

.
├── css
│   └── main.css
├── dist
│   ├── LabelLeft.js
│   ├── LabelRight.js
│   ├── Main.js
│   ├── Main.min.js
│   └── Toggle.js
├── src
│   ├── Label.js
│   ├── Main.js
│   └── Toggle.js
├── stories
│   └── Main.js
├── storybook
│   ├── config.js
│   └── webpack.config.js
├── tests
│   ├── helpers
│   │   └── setup.js
│   └── specs
│       ├── Label.spec.js
│       ├── Main.spec.js
│       └── Toggle.spec.js
├── .babelrc
├── .editorconfig
├── .eslintrc
├── .gitignore
├── .npmignore
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
└── package.json

How to Develop with Storybook

Create your storybook stories on stories folder. If you want to create another story file, remember to load on .storybook/config.js. With all stories, just run npm run storybook to open your isolated environment.

If you want to know more about storybook, see this link.

Code Standarts

We follow the Airbnb React/JSX Style Guide.

This project uses eslint and .editorconfig is defined to have indent_size of 4 spaces.

This project also uses Husky to prevent push messy and wrong code. Please, don't be stupid, fix all errors before push =D

Tasks

  • npm run build: build component to external use.
  • npm run pub: build and publish the component to npm.
  • npm run storybook: launch storybook to develop your component.
  • npm run build-storybook: build an static storybook to .out folder.
  • npm run deploy-storybook: build and deploy a storybook with component to gh-pages.
  • npm run test: run all specs.
  • npm run test:tdd: run all specs and watch.
  • npm run test:coverage: run all specs and coverage.
  • npm run lint: lint all files searching for errors.
  • npm run lint:fix: fix some lint errors.