diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4c4e151..b48ab6b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,6 +33,7 @@ - Make sure `npm test` passes. (see [development setup](#development-setup)) - If adding new feature: + - Add accompanying test case. - Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it. @@ -41,6 +42,7 @@ - Add appropriate test coverage if applicable. ### Work Step Example + - Fork the repository from [nicolasbeauvais/vue-social-sharing](https://github.com/nicolasbeauvais/vue-social-sharing) ! - Create your topic branch from `master`: `git branch my-new-topic origin/master` - Add codes and pass tests ! @@ -58,22 +60,21 @@ After cloning the repo, run: ### Commonly used NPM scripts - # watch and serve with hot reload unit test at localhost:8080 - $ npm run dev + # Run Storybook to experiment with the library + $ npm run storybook - # lint source codes + # Lint source codes $ npm run lint - # run unit tests in browser (firefox/safari/chrome) - $ npm run test:unit - - # build all dist files, including npm packages + # Build all dist files, including npm packages $ npm run build - # run the full test suite, include linting - $ npm test + # Run the full test suite, include linting + $ npm run test + + # Render an example page with all the buttons + $ npm run example There are some other scripts available in the `scripts` section of the `package.json` file. The default test script will do the following: lint with ESLint -> unit tests with coverage -> e2e tests. **Please make sure to have this pass successfully before submitting a PR.** Although the same tests will be run against your PR on the CI server, it is better to have it working locally beforehand. -