Developing Glass Web Components
Last updated
Last updated
Glass Web Components are a library of Web Components designed for use with Rock Mountain Platform, but since they are just Web Components, they work in any major framework or with no framework at all.
Find the complete inventory and usage documentation for the library here:
Stencil is a compiler for building fast web apps using Web Components.
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
To start building a new web component using Stencil, change into the libraries/glass-web-components
directory and run:
To build the component library for production, run:
rush build
or...
rush rebuild
To run the unit tests for the components, run:
CD into the libraries/glass-web-components
directory.
Make sure that the package number in package.json
has been updated since the last publish to npm.
Run rush build
or rush rebuild
to build the package for production.
Execute npm login
(and enter credentials).
Publish the public package to the npm registry using: npm publish
To see your public package page, visit https://www.npmjs.com/package/glass-web-components
Next, you need to test in the preview
branch. Make sure your in it.
Update the version number of glass-web-components
in apps/rockmtn-platform/package.json
to match what you just published to NPM.
Execute rush build
or rush rebuild
In apps/rockmtn-platform, execute npm run dev
and do a visual spot-check on everything.
Need help? Check out Stencil.js docs .
For more information on the publish command, see the .
- Forums for Ionic Framework, Capacitor, Appflow, Stencil, Portals