@altibox/lib
v1.0.0-beta.11
Published
Altibox library for components & common functions. Successor of altibox.min.js
Downloads
20
Keywords
Readme
What is this?
This library is meant to replace altibox.min.js for typescript projects.
Usage
To install:npm install @altibox/lib
To use this package you should import from @altibox/lib/dist
. (Importing the non-transpiled files for some reason won't work)
So to import the Loader component you'd do this this way:import Loader from '@altibox/lib/dist/components/Loader'
The same goes for regular functions:import { fetchJson } from '@altibox/lib/dist/api'
Documentation
Documentation (auto generated) can be found in the docs folder
This is mostly useful for the regular functions (non-components).
For documentation for the components it's best so run npm start
locally and use Storybook (explained below).
Will contain:
- Reusable React components
- Functions that are reused
- Eventually this should become the replacement for altibox.min.js
How to test components you're making here?
Run npm start
.
This will start up Storybook on port 6006
which will start an auto-reload server which renders out some examples of the components and the code used in the examples.
Don't forget to write unit tests for the bugs you fix and new features you add!
Releasing a new version
Make sure you're logged in to npm first! npm adduser
Then just run npm run release
and follow the steps.