We'd love for you to contribute to our source code and to make Momentum UI Vue even better than it is today! Below are the guidelines to follow.
- Questions, Issues or Ideas
- Requirements
- Development Environment
- Running the project locally
- Adding a new component
- Testing
- Code Guidelines
- Commit Guidelines
- Submitting a Code Review
- Run the play script which will build and watch the library, then serve it at localhost:5000
yarn start
from the vue (momentum-ui/vue) directoryyarn start:vue
from the root (momentum-ui) directory
- You can access the playground
localhost:5000
- cd into the vue directory:
cd vue/
- Use yarn scripts to create yourComponent. Replace
<component-name>
with the kebab-cased name of the new component.- Create Component:
yarn new <component-name>
- Create Component:
- Start the app and the new component will now be availble in the Playground.
└── lib
└── sample # component directory
├── index.vue # component file
├── index.js # barrel file
├── examples # examples directory
| ├── default.vue # default example component
| └── index.js # examples barrel file
└── tests # tests directory
├── sample.spec.js # component unit test
└── __snapshots__ # snapshots directory (will be generated Jest)
└── sample.spec.js.snap # snapshots file (will be generated by Jest)
- In the
<component-name>/tests/
directory, ensure that you add tests to cover all of the component code. - Run the test and ensure that all tests are passing by running:
yarn test
from the vue (momentum-ui/vue) directoryyarn test:vue
from the root (momentum-ui) directory
We follow the vue Style Guide
We use eslint-plugin-vue. You need set Visual Studio Code or Sublime Text manually according this document.
By contributing your code to the @momentum-ui/vue
GitHub repository, you agree to license your contribution under the MIT license.