aprilabank

<p align="center"> <img align="center" style="margin: 0 auto" width="150px" src="/src/assets/logo/logo.svg" /> </p>

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
aprilabank
0.7.34 years ago5 years agoMinified + gzip package size for aprilabank in KB

Readme


Aprila Kit

Aprila Kit provides front-end developers & engineers a collection of reusable HTML and CSS partials to build websites and user interfaces. Adopting the library enables developers to use consistent markup, styles, and behavior in prototype and production work.

šŸ“š Aprila Kit documentation is available here

ā© tl;dr

npm install
npm start

:neckbeard: Running Aprilakit locally

clone this repo
npm install                 # to install dependencies
npm start                   # start local development server

Open http://localhost:6006/ šŸš€

šŸ“š Documentation

We use Storybook to document the design system.
Stories are made using a file format called MDX, and is used to write rich documentation for the components. You will find all the documentation files under the folder /stories.

Guidelines

  • All components should do one thing, and do that thing well.
  • All CSS should be written to adhere to the BEM methology.
  • Don't use Objects or Arrays as props for Web Components. Try to rethink the issue and see if you can make two elements like select and option. Read more about best practises here
  • New functionality should be reviewed by at least one other person before going into Aprila Kit.

Contributing

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 Aprila Kit, use a separate css file to add or override functionality using your own classes and components.
2: If you're adding new functionality to Aprila Kit, follow the development guide below.
3: If you've found a bug, follow the below "Found a bug?" guide below.

Development

To develop on the project, please first read our guidelines and the contributing section above.
To add a new feature:
  • Create a new branch (git checkout -b branchname)
  • Work on your feature, and commit your changes
  • Update the version number in the package.json file. You can read more about versioning below
  • Create a pull request into the development branch and ask for a review

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 Aprila Kit, update the version number. See below for details.

Versioning

Aprila Kit uses semantic versioning to make sure once a site starts using it, the CSS or Web Components won't suddenly change and break the site. The version number is located in package.json
When a breaking change is added, a new major version is required.

Publishing a new version on NPM

The development branch works as our beta branch, so we can try out new features before we roll them out into production.
To publish a beta version:
  • Checkout to development
  • Bump the package.json for example from 0.6.10-beta.9 to 0.6.10-beta.10
  • Run npm publish --tag beta

master is used as our production branch, so when publishing a new version, make sure you have tested all the new features, and taken into account breaking changes etc.
To publish to production:
  • Checkout to master
  • Bump the package.json for example from 0.6.9 to 0.6.10 depending on the types of changes
  • Run npm publish

šŸ”Ø Hosting

The documentation is hosted on Netlify. Each time code is pushed to the master branch, a new build of the documentation will be deployed. Netlify also creates a unique build per pull request so it's easy for other people to review and see the changes live.
Aprila Kit is published on NPM and can be installed simply by running npm install --save aprilabank. If you want to use a CDN, we reccommend that you use JSDeliver.

ā­ Adding icons

  • Add one or more new svg icons in the src/assets/icons/ folder
  • Run npm run build:package:svg to generate SVG sprite.
  • Publish a new version on NPM

šŸŒ Browser support

The CSS components should work down to at least IE11. You can make Web Components work down to IE11 with polyfills, but we have not tested Aprila Kit with this in mind. If the application you are building needs to support IE11 we recommend that you only use the CSS components, and implement the dynamic parts yourself. If you don't need IE11 support, go for the Web Components as they are way easier to use, and also update at a later point.

šŸ“‚ Application structure

ā”œā”€ā”€ /.storybook                 - Storybook config files
ā”œā”€ā”€ /build                      - Folder that contains the bundled files
ā”‚   ā”œā”€ā”€ /assets                 - Fonts, icons, logo assets
ā”‚   ā”œā”€ā”€ /components             - Individual components for indiviual imports
ā”‚   ā”œā”€ā”€ base.css                - Base styles like font declarations and variables
ā”‚   ā”œā”€ā”€ icons.js                - Javascript snippet that loads the sprite on your page,
ā”‚   ā”œā”€ā”€ main.css                ā€“ Main CSS bundle with all components
ā”‚   ā”œā”€ā”€ main.js                 - Main Web Component bundle with all components
ā”‚   ā””ā”€ā”€ sprite.svg              - Svg sprite with all icons
ā”œā”€ā”€ /src
ā”‚   ā”œā”€ā”€ /assets                 - All assets like icons, fonts, logos
ā”‚   ā”œā”€ā”€ /components             - Component files (CSS, and JS)
ā”‚   ā”œā”€ā”€ /styles                 - Global CSS
ā”‚   ā”œā”€ā”€ /utils                  - Helper functions
ā”‚
ā”œā”€ā”€ /stories                    - Documentation files for Storybook

Found a bug?

  • If you've found a bug, you can create a new issue via github.
  • If you want to fix this issue yourself, do so and then follow the development guide above.

šŸ“¦ Dependencies

We try to have as few dependencies as possible in Aprila Kit. This makes it easier to maintain in the long run, and it makes it more secure as we are not using some unkown third party code in our projects.