@pitcher/js-api 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +23 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,9 +2,30 @@
2
2
 
3
3
  This is the JavaScript API to interact with the data layer of the NG platform.
4
4
 
5
- ## Installation
6
-
7
5
  ## Usage
8
6
 
7
+ ### In the browser
8
+
9
+ ```html
10
+ <!doctype html>
11
+ <html>
12
+ <head>
13
+ <title>My app</title>
14
+ <script src="https://unpkg.com/@pitcher/js-api"></script>
15
+ </head>
16
+ <body>
17
+ <script>
18
+ const api = pitcher.usePitcherApi()
19
+ const ui = pitcher.useUi()
20
+ const admin = pitcher.useAdmin()
21
+
22
+ api.getEnv() // soon to be snake_case as well
23
+ ui.select_content()
24
+ admin.get_env()
25
+ </script>
26
+ </body>
27
+ </html>
28
+ ```
29
+
9
30
  For more details, please visit the [documentation](https://pitcherag.github.io/canvas-ui).
10
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/js-api",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "main": "js-api.umd.min.js",
6
6
  "sideEffects": false