28 lines
No EOL
2.4 KiB
Markdown
28 lines
No EOL
2.4 KiB
Markdown
---
|
|
layout: doc
|
|
---
|
|
|
|
# Publishing `shacl-vue` and its dependencies to `npm`
|
|
|
|
Relevant `npm` packages are:
|
|
- [shacl-tulip](https://www.npmjs.com/package/shacl-tulip)
|
|
- [flatson-js](https://www.npmjs.com/package/flatson-js)
|
|
- [shacl-vue](https://www.npmjs.com/package/shacl-vue)
|
|
|
|
RDF and form data handling functionalities underlying the core `shacl-vue` features are provided by the [`shacl-tulip`](https://hub.psychoinformatics.de/orinoco/shacl-tulip) library (like "`shacl-vue`-lib", but flowery), a core dependency of `shacl-vue`. It is completely independent of VueJS, yet class constructors allow passing reactive objects as arguments, which `shacl-tulip` handles seamlessly. It also focuses purely on library-level functionality and contains no frontend code.
|
|
|
|
For table import and export support, `shacl-vue` uses the [FlatSON specification](https://hub.psychoinformatics.de/orinoco/flatson), for which [flatson-js](https://www.npmjs.com/package/flatson-js) provides helper functionality.
|
|
|
|
Lastly, while the `shacl-vue` deployment steps above describe a git-repository-based process, it is also possible to use the `shacl-vue` package as a dependency in other VueJS projects. For that reason it is also published to `npm`.
|
|
|
|
Publishing any of these packages to `npm` requires:
|
|
- A registered `npm` user
|
|
- Maintainer privileges for that user to the relevant `npm` package
|
|
- Acquiring a local clone of the package's source code repository
|
|
- Updating the package source code, and in particular bumping the package major/minor version in the `package.json` file (e.g. [here](https://hub.psychoinformatics.de/orinoco/shacl-tulip/src/branch/main/package.json#L3))
|
|
- A local environment with `nodejs` installed
|
|
- Running: `npm publish` from the local root directory of the git clone
|
|
|
|
_Note that 2FA might be involved in the authentication step_
|
|
|
|
If the published version of either `shacl-tulip` or `flatson-js` is changed, the dependency in `shacl-vue` also needs to be updated (e.g. [here](https://hub.psychoinformatics.de/orinoco/shacl-vue/src/commit/6f1651320aa22667bfff808b84bf2f3754d8853f/package.json#L60)), which in turn will require a new commit to the `shacl-vue` repository and an updated version published to `npm`. This will in turn require projects using `shacl-vue` to pin the latest version, either by updating the submodule described in the git-repository-based process above or by accessing the latest `shacl-vue` package version from `npm`. |