Skip to content

bonitasoft/bonita-js-components

Repository files navigation

bonita-js-components Build Status

bonita angular components library.

requirements

You need to have nodejs, yarn, npm and gulp

Node version 6 should be used.

This library also needs angular 1.4.5 to run properly.

  • bo-sortable (bo-sortable sort-options="sortOptions" on-sort="onSort( options)")
  • bo-storable (bo-storable="storageId" on-storage-loaded="loadContent()")
  • bo-sorter (default id=key, or bo-sorter='key')
  • selectAll (bo-selectable, bo-selectAll, bo-selector)
  • bo-repeatable
  • table-settings
  • drag and drop
  • draggable-columns (need to add ng-sortable dependency to make it work as it is not imported by default)

Available command

First, launch yarn install to install the dependencies.

  • $ npm start: launch the developpement environnement with a local server+livreload. Also, unit tests ran in background
  • $ npm run dist : create a dist folder with minified/concatenated files. Please not that this command is only available in the release branch.
  • $ npm test will run the unit test suite on PhantomJS
  • $ npm run documentation will generate the a ngdoc documentation site inside a ./docs/ directory

Todo

Publishing a new version

The master branch do not contains any dist files.

There is a dedicated branch which holds dist files to be distributed. Once you're ready to ship a new version

  1. If not already did, bump version number in package.json and commit changes.

  2. Go to the ```release`` branch, marge master on it, and launch the dist build.

$ git checkout release
$ git merge master
$ npm run dist
  1. Commit the new dist files in release and tag the branch accordingly to your package.json version number
$ git commit -m"Release x.x.x"
$ git tag -a x.x.x
$ git push --follow-tags
  1. Celebrate!

The code coverage is build when you run a test, you can access to it by opening the ./coverage/Phantom*/index.html in a browser.

Documentation

To ease the documentation process

$ npm run documentation

will run a local server (with livereload) and generate the docs sites each time you update the js files.

Code coverage

The karma test suite provides code coverage through karma-istanbul. The generated coverage site is at the root of the project, in the /coverage/ folder.