Web components based on the Digital Content Component (DCC) model for the Mundorum space.
In this project root directory:
npm installTo bundle the JavaScript components and infrastructure, we adopt Vite. The following statements build the development and production packages:
npm run build:devnpm run buildThe environment can be prepared for local execution for learning, tests, and development. We suggest the following steps to prepare the environment:
To provide flexibility, the default package.json configuration does not include the -o-id library, and there are two installation options. They are exclusive, and you cannot apply both:
If you are only using the -o-id library without modifying it, you can install it:
npm install @mundorum/oidSuppose you are modifying the library and you want your modifications to reflect in the playground or test environment automatically. In that case, you can emulate the -o-id library installation as a node module straight from your dist directory.
There are two steps to link local Mundorum libraries in the development mode.
Inside /dist directory:
npm linkInside /playground/npm/node_modules/ directory:
npm link @mundorum/oidThis procedure mimics the -o-id library installed in the npm straight from dist.
If you wish to run tests in code developed under the -o-id framework:
If you want to load NPM libraries locally, run the Vite server:
npm run devIf you want to load libraries from the jsDelivr CDN, as it will be in the deployed version, you can run a local web server under VSCode, the plugin Microsoft Live Preview.