:warning: This repository is not maintained anymore.
The new repository (https://github.com/swiss/designsystem) is now private.
Please contact Davy.Augier@bk.admin.ch to request an access.
Delivering HTML structures, CSS assets and design elements to build frontends for the Swiss Administration websites.
# install dependencies
$ npm install
Adapt your Node version to ^16.13.2
, for example using nvm
:
# Choose the right Node version
$ nvm use 16
# serve Storybook with hot reload
$ npm run dev
# or
$ npm run dev:storybook
# serve Nuxt application with hot reload
$ npm run dev:nuxt
# serve both Storybook and Nuxt application
$ npm run dev:all
# build Storybook
$ npm run build
# build Storybook
$ npm run build-css
package.json
file and increment the version
of the package, for example 1.0.0
package.json
file, with a v
prefix, for example v1.0.0
Release 1.0.0
When a new version
is pushed on the main
branch, this will trigger the generation of a a new CSS file on the CDN.
If the version is 1.0.0
, the CSS file will be delivered at
https://liip-bund-ds.fra1.digitaloceanspaces.com/v1.0.0/main.css
.
The latest version of the CSS file will be available at
https://liip-bund-ds.fra1.digitaloceanspaces.com/latest/main.css
.
# run Chromatic
$ git checkout main
$ npm run test
This will run the test and provide an URL pointing to the Chromatic app. You can learn more about the Chromatic tool at Chromatic's website.
If you want to run the test before merging your branches into the main
branch, you can first check out stage
, merge your modifications onto this branch, and then run the regression visual test.