This module supplies an optimized precompiled lodash template for use in the browser.
npm i topcoat-button-bar-template --save
var ButtonBar = require('topcoat-button-bar-template');
var container = document.querySelector('.container');
container.innerHTML = ButtonBar({"namespace": "topcoat","buttons": [
{"label":"a"},
{"label":"b"},
{"label":"c"},
{"label":"d"}
]});
Look in the example directory for more details.
The example uses browserify for JavaScript bundles and resinate for CSS bundles to cut down on the rigmarole of supplying modules to the browser.
If you want to play with the example you can make changes then update the
output by opening terminal and typing npm run build
.
Look at the scripts
section of
package.json for more details.
To run the tests open terminal and type:
npm install
npm test