Skip to content

Developer Setup

Ronny Mikalsen edited this page Jun 29, 2017 · 23 revisions

This is a library for Angular, implementing the Angular Package Format v4.0.

Features:

  • the Mime IIIF viewer library
  • unit test for the library
  • a demo application that consumes the library in JIT mode and runs in watch mode
  • an integration app that consumes the library in JIT and AOT mode and runs e2e tests

Common tasks are present as npm scripts:

  • npm start to run a live-reload server with the demo app
  • npm run test to test in watch mode, or npm run test:once to only run once
  • npm run build to build the library
  • npm run lint to lint
  • npm run clean to clean
  • npm run integration to run the integration e2e tests
  • npm install ./relative/path/to/lib after npm run build to test locally in another app

If you need to debug the integration app, please check ./integration/README.md.

Getting your environment set up

  1. Make sure you have node installed with a version at least 7.0.0.
  2. Run npm install -g yarn to install Yarn.
  3. Run npm install -g @angular/cli to install Angular Cli
  4. Fork the NationalLibraryOfNorway/ngx-mime repo.
  5. Clone your fork. Recommendation: name your git remotes upstream for NationalLibraryOfNorway/ngx-mime and <your-username> for your fork.
  6. From the root of the project, run yarn install.

Coding Rules

To ensure consistency throughout the source code, keep these rules in mind as you are working:

  • All features or bug fixes must be tested by one or more specs (unit-tests).
  • All public API methods must be documented.
  • We follow Google's JavaScript Style Guide, but wrap all code at 100 characters.

Commit Message Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the Mime change log.

Commit Message Format

Add a title and body that follows the Conventional Commits Specification.

Clone this wiki locally