Skip to content
This repository was archived by the owner on Jun 15, 2019. It is now read-only.

Commit 7a818e4

Browse files
committed
build(rollup): Outputs were separated per target (browser and node)
Now, the project has 3 outputs: 1. `main.umd.js`: Dependencies have not been bundled / Suitable to use in "node" and any other environment that is compatible with UMD module-system and can resolve dependencies. 2. `bundle.umd.js`: Dependencies have been bundled / Suitable for browser environment and in <script> tag 3. `bundle.esm.js`: Dependencies have been bundled / Suitable for browser environment but is compatible with ES6 imports. See: ".releaserc.json" file.
1 parent a01dae0 commit 7a818e4

File tree

5 files changed

+920
-25
lines changed

5 files changed

+920
-25
lines changed

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
*
22
!/LICENSE
33
!/dist/types/**/*
4-
!/dist/*.js
4+
!/dist/main.js

.releaserc.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
"@semantic-release/npm",
66
["@semantic-release/github", {
77
"assets": [
8-
{"path": "dist/text-wrap.umd.js", "label": "UMD distribution"},
9-
{"path": "dist/text-wrap.esm.js", "label": "ESM distribution"}
8+
{"path": "dist/bundle.umd.js", "label": "Suitable for use in browser via script tag: `<script src=\"...\">`"},
9+
{"path": "dist/bundle.umd.js.map", "label": "The source-map for `bundle.umd.js`"},
10+
11+
{"path": "dist/bundle.esm.js", "label": "Suitable for use in browser via ES6-module-import: `import TextWrapper from '...'` (or: `<script src=\"...\" type=\"module\">`)"},
12+
{"path": "dist/bundle.esm.js.map", "label": "The source-map for `bundle.esm.js`"},
13+
14+
{"path": "dist/main.umd.js", "label": "Suitable for Node.js projects (and any other UMD-compatible environment that can resolve dependencies)\nThis one has been published on [NPM](https://www.npmjs.com/package/@live-html-editor/text-wrap) and you can install it with `npm install ...`."},
15+
{"path": "dist/main.umd.js.map", "label": "The source-map for `main.umd.js`"}
1016
]
1117
}]
1218
]

0 commit comments

Comments
 (0)