Hedwig is Brings Design System.
???? This repo is public, so please consider this when contributing
npm install npm run dev
clone this repo npm install # to install dependencies add .env file # get variables from Heroku or Hedwig slack channel. See .env.example file npm run s3:download # to download assets from S3 npm run dev # start local development server
To keep assets up to date, run
npm run s3:download to download the latest assets from S3. If you're having trouble downloading, try to disconnect your VPN.
Docs are auto generated from the components markdown file. The filename will generate the menu name and URL. It is recommended to save the documentation files together with your components.
In development, the docs will live reload. It is recommended to always develop the components within the documentation.
The documentation is auto-deployed to Heroku https://hedwig-docs.herokuapp.com when pushed to master.
data-attributesto attach functionality.
All right, you need to change or add something. What do you do?
1: If the thing you're changing or adding is specific to your project, and not all sites using Hedwig, use a separate css file to add or override functionality using your own classes and components.
2: If you're adding new functionality to Hedwig, follow the below development guide below.
3: If you've found a bug, follow the below "Found a bug?" guide below.
To develop on the project, please first read our guidelines and the contributing section above.
To add a new feature:
git checkout -b branchname)
To modify an existing feature follow the same process, but also remember the versioning system. If there is a breaking change, or if this might impact existing sites using hedwig, update the version number. See below for details.
Tip: In order to test changes on a locally running application which uses hedwig, replace the dependencies with the following dev server URLs (after running hedwig locally):
Hedwig uses semantic versioning to make sure once a site starts using it, the CSS file won't suddenly change and break the site. The version number is located in
package.json, and will be appended to the
.js files. Example -
When a breaking change is added, a new major version is required.
To upload the build folder to S3:
npm run s3:upload
To download the build folder from S3:
npm run s3:download
Remember to fill en the keys in
We use inline SVG's for icons.
For the future it will probably be a good idea to have a own repository for icons, (i.e.
hedwig-icons), where both source "master" files (AI, Sketch) and the SVG's can be stored.
It works like this:
build/assets/icons/folder (for now)
npm run svgto generate SVG sprite
To update icons in production:
npm run s3:upload
https://bring-hedwig.s3.amazonaws.com/hedwig/icons.jsin the footer of the document
We host our fonts on S3 (http://bring-hedwig.s3.amazonaws.com/assets/fonts/fonts.css). To update the fonts, update font files in
assets/fonts on S3. We do it this way both to keep Hedwig clean and to avoid legal issues with publishing the fonts on our open-sourced repo.
Linting our project is import to keep a holistic code base. It is recommended to use a linting plugin for your editor while developing.
We support every browser 2 last version, pluss IE10. For IE9 we have partial support. We want it to work, but it won't look perfect.
Note: Most components are tested in IE10, but IE9 is still yet to be tested.
├── /build - Build folder. Contains minified assets. - auto generated ├── /docs - Contains the style guide system (Catalog) - auto generated ├── /scripts - Contains all scripts for building and compiling │ ├── /src/[posten/bring/shared] - All modules, split up by area │ ├── /_config - CSS Variables │ ├── /base - Global CSS - Body and typography │ │ │ └── /module │ ├── / *.css - Module styles │ ├── / *.js - Module scripts (if any) │ └── / *.md - Module documentation (for Catalog) │ ├── /tmp - Temporary folder - auto generated ├── /templates - Contains example `.css` and `.js` files │ ├── / .env - Environment variables, required for publishing updates to s3 ├── / server.js - Node server, starts local web servers for docs and assets ├── / package.json - Contains all npm scripts └── / *.* - Various dotfiles and config files
/scripts folder contains a set of custom scripts that helps compile the docs.
List of npm scripts:
dev: Starts the watcher and starts the node server (in development mode)
Q: I have a question! Who do i ask? A: Use the Hedwig slack channel!
included in bundle: