Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum preparation for npm publishing #81

Merged
merged 2 commits into from
Feb 26, 2025
Merged

Minimum preparation for npm publishing #81

merged 2 commits into from
Feb 26, 2025

Conversation

jsheunis
Copy link
Collaborator

The goal here is to get the package up on npm. For this, several dependencies were updated and an index.js file was added to serve as the package entrypoint. For now, the ShaclVue component is provided as the default export, and the only current named export is the useShapeData composable, see

export function useShapeData(config) {
.

Other projects installing and using shacl-vue as a dependency can then:

  • import the default export component with: import ShaclVue from 'shacl-vue'
  • import the named export function with: import { useShapeData } from 'shacl-vue'

Using these imports, respectively, would be done as follows:

for the VueJS component:

<ShaclVue :configUrl="url-of-config.json"></ShaclVue>

and for the function:

const config = {}
config.value = {}
config.value.shapes_url = '<url-of-shacl-schema>'
const {
        shapesDataset,
        nodeShapes,
        propertyGroups,
        nodeShapeNamesArray,
        shapePrefixes,
        prefixArray,
        prefixes_ready,
        nodeShapeIRIs,
        nodeShapeNames,
        page_ready,
        getSHACLschema
    } = useShapeData(config)

@jsheunis jsheunis merged commit 95aa1c4 into main Feb 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant