@dreamerbird/browser-bundles 0.0.0-stage → 1.0.0

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.
package/LICENSE ADDED
@@ -0,0 +1,3 @@
1
+ This is a bundle of @dreamerbird/core and @dreamerbird/studio packages.
2
+
3
+ See their licenses in their repo: https://github.com/theatre-js/theatre
package/README.md CHANGED
@@ -1,3 +1,32 @@
1
- # Temporary Holding Version
1
+ # Theatre.js browser bundles
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A custom build of Theatre.js that you can use via a `<script>` tag rather than using a bundler.
4
+
5
+ ## How to use
6
+
7
+ There are currently two builds:
8
+
9
+ * `dist/core-and-studio.js`
10
+ * `dist/core-only.min.js`
11
+
12
+ As the names imply, one includes both `@dreamerbird/studio` and `@dreamerbird/core`, while the other is a minified version of `@dreamerbird/core`.
13
+
14
+ Example:
15
+
16
+ ```html
17
+ <script src="path/to/core-and-studio.js"></script>
18
+ <script>
19
+ // here, core is equal to `import * as core from '@dreamerbird/core`
20
+ const core = Theatre.core
21
+ // here, studio is equal to `import studio from '@dreamerbird/studio`.
22
+ // Note this would be undefined if you're using `core-only.min.js`
23
+ const studio = Theatre.studio
24
+
25
+ // only call this if you're using the core-and-studio.js bundle
26
+ studio.initialize()
27
+
28
+ const project = core.getProject("My project")
29
+ const sheet = project.sheet("...")
30
+ // and so on...
31
+ </script>
32
+ ```