This is the JavaScript API to interact with the data layer of the NG platform.
<!doctype html>
<html>
<head>
<title>My app</title>
<script src="https://cdn.jsdelivr.net/npm/@pitcher/js-api"></script>
<!-- or for beta: -->
<!-- <script src="https://cdn.jsdelivr.net/npm/@pitcher/js-api@beta"></script> -->
</head>
<body>
<script>
const api = pitcher.usePitcherApi()
const ui = pitcher.useUi()
const admin = pitcher.useAdmin()
api.getEnv()
ui.selectContent()
admin.getEnv()
</script>
</body>
</html>
For more details, please visit the documentation.
- Go to
canvas-ui
folder - Edit
src/assets/jsApiAssets/package.json
and change version in the file to beta eg.1.0.0-beta.0
- Start console in
canvas-ui
folder - Run
yarn
- Run
yarn js-api:build
- Run
cd builds/js-api
- Run
npm publish --tag beta