Skip to content
web-components / 0.7.1-beta

web-components 0.7.1-beta

Install from the command line:
Learn more about npm packages
$ npm install @laws-africa/web-components@0.7.1-beta
Install via package.json:
"@laws-africa/web-components": "0.7.1-beta"

About this version

Built With Stencil

Laws.Africa web component library (beta)

This is a collection of web components for formatting and adding interactivity to Akoma Ntoso documents.

These are web components, so they work in any major framework or with no framework at all.

Components

Content components

Behaviour components

Using these component

There are three methods for using these web components:

Script tag

  • Put a script tag similar to this <script type="module" src="https://cdn.jsdelivr.net/gh/laws-africa/la-web-components@0.7.1-beta/dist/la-web-components/la-web-components.esm.js"></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

Node Modules

  • Run npm install @laws-africa/web-components --save
  • Put a script tag similar to this <script type="module" src="node_modules/@laws-africa/web-components/dist/la-web-components/la-web-components.esm.js"></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

In a stencil-starter app

  • Run npm install @laws-africa/web-components --save
  • Add an import to the npm packages import @laws-africa;
  • Then you can use the element anywhere in your template, JSX, html etc

Development

Clone this repository and run:

npm install

Need help? Check out the Stencil docs.

Using Storybook

Development is easiest using Storybook for testing.

Run these commands in separate terminals:

npm run storybook
npm run stencil-for-storybook

To build Storybook for static use (not yet tested):

npm run build-storybook

Without Storybook

npm run start

Building for production

To build the component for production, run:

npm run build

Running tests

To run the unit tests for the components, run:

npm test

Releasing a new version

  1. Update the version number: npm version --no-git-tag-version <version>
  2. Commit and push to GitHub using a Pull Request onto the master branch
  3. GitHub will build the package and update the dist directory
  4. Tag and release using GitHub off of the master branch
  5. GitHub will release a new version of the built package to GitHub packages

Copyright and license

Copyright 2021 Laws.Africa.

Licensed under GNU LGPLv3.

Details


Assets

  • web-components-0.7.1-beta-npm.tgz

Download activity

  • Total downloads 17
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all