Skip to content

Developer Tooling and Workflow

aeschylus edited this page Dec 4, 2014 · 14 revisions

Background Information

Javascript and Node

The NPM package manager

Javascript Resources

Bower Package Manager

Grunt

grunt is a task-runner for managing repetitive tasks involved in the development process, such as building, linting, format-checking, and compressing files, running tests and generating coverage reports, and reloading the browser on file changes (for interactive feedback of feature development).

Building and Compressing

Source Maps

Livereload

Tasks

More information

Jasmine and Istanbul

Git Hooks

Editorconfig and jsHint

Contributors use a variety of text editors according to circumstance and preference. This can introduce inconsistencies in the source text files, such as spaces being replaced with tabs, indentation spans being shortened, and whitespace being added or subtracted from the end of lines. Using your editor's EditorConfig plugin resolves these inconsistencies while allowing each developer to use her own preferences while developing.

JSHint enforces the style of the code. Mirador uses the idiomatic.js styleguide.

Cloning and Running the Project

To begin working on the project, fork it on github or clone locally: git clone https://github.com/IIIF/m2.git

Install all dependencies with npm install and bower install. Run grunt.

A good practice is to clone the project into a directory that is being served by a running http server such as apache or nginx. However, if you would like to test and develop without using an external server, you may run grunt serve.

Either visit the root folder of the project at localhost, or, if you are using grunt serve, see the example at localhost:3001

Create a branch for your work: e.g.: git checkout -b my-feature-branch or git checkout -b my-bug-fix

The Usual Development Workflow

Submitting Your Contribution