cotomy 0.1.60 → 0.1.63
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/README.md +27 -0
- package/dist/browser/cotomy.js +2898 -0
- package/dist/browser/cotomy.js.map +1 -0
- package/dist/browser/cotomy.min.js +2 -0
- package/dist/browser/cotomy.min.js.map +1 -0
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/esm/api.js +468 -0
- package/dist/esm/api.js.map +1 -0
- package/dist/esm/debug.js +42 -0
- package/dist/esm/debug.js.map +1 -0
- package/dist/esm/form.js +383 -0
- package/dist/esm/form.js.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/page.js +128 -0
- package/dist/esm/page.js.map +1 -0
- package/dist/esm/view.js +1198 -0
- package/dist/esm/view.js.map +1 -0
- package/package.json +27 -6
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- /package/dist/{api.d.ts → types/api.d.ts} +0 -0
- /package/dist/{debug.d.ts → types/debug.d.ts} +0 -0
- /package/dist/{form.d.ts → types/form.d.ts} +0 -0
- /package/dist/{index.d.ts → types/index.d.ts} +0 -0
- /package/dist/{page.d.ts → types/page.d.ts} +0 -0
- /package/dist/{view.d.ts → types/view.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -44,6 +44,33 @@ By passing HTML and CSS strings to the constructor, it is possible to generate E
|
|
|
44
44
|
- `"display HTML in character literals with color coding"` → `"syntax highlighting for embedded HTML"`
|
|
45
45
|
- `"generate Element designs with a limited scope"` → `"generate scoped DOM elements with associated styles"`
|
|
46
46
|
|
|
47
|
+
## Development
|
|
48
|
+
|
|
49
|
+
Cotomy ships with both ESM (`dist/esm`) and CommonJS (`dist/cjs`) builds, plus generated type definitions in `dist/types`.
|
|
50
|
+
For direct `<script>` usage, browser-ready bundles are available at `dist/browser/cotomy.js` and `dist/browser/cotomy.min.js` (also served via the npm `unpkg` entry).
|
|
51
|
+
Include the minified build like so:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<script src="https://unpkg.com/cotomy/dist/browser/cotomy.min.js"></script>
|
|
55
|
+
<script>
|
|
56
|
+
const el = new Cotomy.CotomyElement("<div>Hello</div>");
|
|
57
|
+
document.body.appendChild(el.element);
|
|
58
|
+
</script>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Run the build to refresh every target bundle:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install
|
|
65
|
+
npm run build
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The Vitest-based test suite can be executed via:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx vitest run
|
|
72
|
+
```
|
|
73
|
+
|
|
47
74
|
## License
|
|
48
75
|
|
|
49
76
|
This project is licensed under the [MIT License](LICENSE).
|