These are a set of packwrap survey components.
Usage
In ES6+
import components from 'bchk-pack'
import yourComponents from './yourComponents'
import { pack } from 'packwrap'
module.exports = pack({
...components,
...yourComponents
})
In HTML using the unpkg cdn:
<div id="root"></div>
<!-- defines $run global variable -->
<script src="https://unpkg.com/bchk-pack" charset="utf-8"></script>
<!-- defines $wrap global variable -->
<script src="https://unpkg.com/bchk-wrap" charset="utf-8"></script>
<script charset="utf-8">
$run(
initialState, // initial state object
modules, // array of survey module objects
'root', // mount div id
$wrap // must be defined from wrap dependency
)
</script>
Development
To build and serve pack.js
file locally on http://localhost:5555 without production flags
yarn run dev
With production flags
yarn run prod
To build source files for import
yarn run build