0.0.15 • Published 3 months ago
@dbca/gov-vue3-components v0.0.15
gov-vue-components
Repository of common vue components that can be imported into department projects.
See /docs folder for user documentation
To add a vue3 component to this library:
- Create a virtual environment for node (You can use nodeenv to do that) # TODO: Set up dev container for this repo?
- Run 'npm install'
- Copy your component file into the src/components folder
- Make sure any css definitions are named uniquely as the scoped attribute for the style block does not work when deploying a library
- Import and export your component in the src/components.js file.
- Add any images you will need for your documentation to the docs/images folder
- Create a markdown file in the docs/components folder to document how your component works
- Add a link to your markdown file in the docs/.vitepress/config.js file
- Run 'npm run docs:dev' command to preview your documentation locally
- Once you are happy with everything, run 'npm run docs:build' - This will client and server bundles and render pages for the docs
- Run 'npm run build' - This will generate a dist folder and the library files (.js, .mjs /assets/.css) or overwrite them if they are already there
- Increment the version number in the package.json file
- Do a Pull Request for the new version
- Once the PR is merged, follow the 'To publish to npm' instructions below to publish the new version to npm.
Maintenance:
- Run 'npm update'
- Run 'npm outdated' to see if anything needs updating
- Modify the package.json as required to update the version numbers
- Run 'npm run build'
- Increment the version number in the package.json file
- Do a Pull Request for the new version
- Once the PR is merged, follow the 'To publish to npm' instructions below to publish the new version to npm.
To publish to npm:
- run 'npm login'
- run 'npm publish --access=public'
- To check it was published correctly, run 'npm view @dbca/gov-vue3-components'