This library uses npm to manage dependencies and webpack as bundler.
Please follow the typical GitHub Flow:
- Fork it (
git clone git@github.com:jpchateau/Interactive-Image.git
) - Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push your branch (
git push origin my-new-feature
) - Create a new Pull Request
You will need Node.js and npm installed on your computer.
The building process is guaranteed to work with the latest Active LTS version of Node.js.
Check the releases here.
Thus, the Travis file mentions Node.js 12
. It might work with previous Node.js versions, but there are unsupported.
Building is done through npm scripts.
Scripts to run:
$ npm install
$ npm run build
When working on local files, you can build the project in development mode, start a local server, and view the result in
your web browser at this URL: http://localhost:8080/examples/index.html
.
Scripts to run:
$ npm run dev
$ npm run start:dev
Use IcoMoon icon library to export icons from IcoMoon app and include them in the project.
Just start by importing src/fonts/selection.json
file into the IcoMoon app.
An overview of the JavaScript code quality can be found at code climate.
Recommended rules to follow: ESLint: Recommended.
Please follow the Sass guidelines when modifying styles.
Scripts to run:
$ npm run eslint
$ npm run sass-lint
Check out the results of the different builds at Travis CI.
Unit tests are done with Mocha test framework.
The assertion library Chai is used.
Scripts to run:
$ npm run test
$ npm run test-with-coverage
dist
- Generated distribution files created by Webpack.docs/_build
- Generated documentation files created by Sphinx.docs
- Documentation files using reStructuredText format.examples
- An HTML file that shows how to use the library.src/fonts
- Fonts used by the project.src/js
- Source files (ES2020).src/scss
- Source files (Sass).test
- Unit tests.
The technical documentation is built with Sphinx and hosted at Read the docs.
It uses the reStructuredText format.
Command | Function |
---|---|
npm run build |
Build all the optimized distributable files |
npm run dev |
Build all the distributable files for local development |
npm run eslint |
Run the ES linter |
npm run sass-lint |
Run the Sass linter |
npm run start:dev |
Start a local server |
npm run test |
Run unit tests |
npm run test-with-coverage |
Run unit tests and display code coverage |
npm run watch |
Run the watcher for local development |
Here, a repository made to test Interactive Image
in different contexts.