This is a boilerplate for creating unified THD global modules.
https://pages.github.homedepot.com/OnlineTechnology/thd-generic-module/coverage/lcov-report/
Rename your module in the webpack configs.
filename: '[name].js',
libraryTarget: 'umd',
library: 'THD_GENERIC_MODULE'
}
Run npm install
from the root folder
Run npm start
will start up a webpack dev server for testing locally on port 8080.
Run npm run test
will run all unit tests
Run npm build
will run a production build
Local server url: http://localhost:8080/
Make changes, and push them to git, using the following commit message syntax:
type(category): Message
- chore – small changes and updates
- docs – documentation
- feat – new features
- fix – bug fixes
- other – misc changes
- refactor – refactoring and clean up
- style – visual, style-only changes
- test – adding or modifying test cases
examples:
git commit –m "feat(widget): Added new options to Paragraph widget."
git commit –m "feat(create page): Added a check before creation to make sure that all required fields are provided."
Run script to generate changelog and patch
npm run release:(patch|minor|major)
git push --follow-tags
registry-switch use artifactory
npm publish --registry https://npm.artifactory.homedepot.com/artifactory/api/npm/npm-local
registry-switch use nexus
npm publish --registry https://nexus.hdtechlab.com/nexus/content/repositories/npm-internal/