@leapdevuk/component-toolbox
v0.0.70
Published
LEAP Dev UK Component Toolbox
Downloads
735
Readme
LEAP Dev UK - Component Toolbox
The LEAP Dev UK Component Toolbox.
Node vesion
We are using Node version 20.10.0 (Latest LTS). See https://nodejs.org/en/about/previous-releases
node -v
To install, upgrade, build, format, lint and run the unit tests, you will need to execute the following within a terminal window.
Install packages
Install the dependencies/packages.
npm install
Upgrade packages
Upgrade the dependencies/packages.
npm upgrade
Formatting
To format the code and follow/enforce a consistent coding style.
npm run format
Linting
To lint the code and perform automated checking for programmatic and stylistic errors.
npm run lint
Unit Tests
To run the unit tests and check/validate the component is performing as expected.
npm run test
To run a single test, for example the DatePicker.
npm run test -- DatePicker
Build
To build the component toolbox as a package.
npm run build
Publish to NPM
To publish the component toolbox package to the NPM account (currently public). npm run build npm publish --access public
Installing locally
To use / test locally in an application.
npm run build
npm pack
This will create a 'leapdevuk-component-toolbox-{version}.tgz' file which can be added as a dependency in the applications package.json file.
"dependencies": {
...
"@leapdevuk/component-toolbox": "file:../../leap-component-toolbox/leapdevuk-component-toolbox-0.0.1.tgz",
...
}
Installing into an application
To use in an application, add package to dependencies.
"dependencies": {
...
"@leapdevuk/component-toolbox": "VERSION_NUMBER",
...
}