@artilleryio/alpha-centauri-components
The building blocks of Artillery products.
Installation
Simply run the following...
npm install @artilleryio/alpha-centauri-components
...and to upgrade:
npm install @artilleryio/alpha-centauri-component@latest
Usage
For full documentation on each component, visit our Visualiser.
Using a component in your project is as simple as...
import { Button } from '@artilleryio/alpha-centauri-components';
...
<Button variant="primary">Click me!</Button>
Development
During development, you might want to preview your component and see if everything is behaving accordingly. For that, the components package has Storybook setup. While writing code, you can simply run the following:
npm run storybook
You can also deploy Storybook to GitHub Pages by running the following command:
npm run deploy-storybook -- --out=.out
Publishing
⚠️ This should only be run once a component is ready to be merged in
The project is currently bundled together using Rollup. This makes it quite simple to build and publish changes. You will also need to be setup via NPM to be able to publish new versions of the package.
Typically, once you've run npm run lint-fix
from the project root, you can build and publish by:
- Bumping up the version number in
package.json
. - Running
npm run build
in the component package root. - If everything goes smoothly, you can then simply run
npm publish
and this pushes the latest version of the package to NPM.
You will need to update the package wherever it is in use, in the wild (e.g. Control Panel etc.)
Dependencies
This project relies on some of our other packages, most notably: