node package manager

noths-global-components

noths-global-components

CircleCI

Frontend global components used at NOTHS

View a component

npm build

This will compile static html components which will be available within /compiled:

Developing a Global Component

Global components are components which will be on most pages of the site.

These components should be as small as possible and not using any framework. This is to reduce the footprint on the consuming application.

These components are static html files with embedded styles and javascript bundled into the component.

The Styles toolkit is a pre-requisite to using the noths-global-components. This is mainly due to fonts. Having them as a static resource which can be browser cached is key to performance and caching of assets which don't change.

Releasing a new version

Update package.json version

npm version major|minor|patch

Note: due to blocked pushing onto master this needs to be pushed onto a branch and merged in

Then publish the new version: npm publish

browser support

The global components currently support:

'iOS >= 8', 'last 2 versions', 'IE 9'

view browserl.ist to see exactly which browsers that includes

Testing

Tests are written in nightwatch

prerequisites: brew install chromedriver

run the tests via: npm run test:features

Mock server

We use simulado as our mock server for the functional tests and for mocking http calls in development.

Development mocks live here: server/dev-mocks.js