Example script tag:
<script
src="https://github.com/fliptables/bcjs/raw/master/BetterContext.js"
data-bc-user="james@example.com"
data-bc-api="1c4f5fd4-e7a9-4d2b-a4db-b6191e5fbe75">
</script>
data-bc-user
- the current better context user iddata-bc-api
- your better context api keyAuto mode example script:
<script
src="https://github.com/fliptables/bcjs/raw/master/BetterContext.js"
data-bc-user="james@example.com"
data-bc-auto
data-bc-api="1c4f5fd4-e7a9-4d2b-a4db-b6191e5fbe75">
</script>
data-bc-auto
- enabled auto bootstrap of charts<div
data-bc-chart="pentagon"
data-bc-id="SOME_ID">
</div>
There are three scripts which can be used while working on the BetterContext JavaScript code.
script/setup
- installs all dependencies and builds the projectscript/build
- builds the projectscript/serve
- starts the development serverScripts can be run from the root of the repo. For example to setup the project you could run:
./scripts/setup