@rollup-extras/plugin-html 1.4.1 → 1.4.3

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 +10 -10
  2. package/package.json +15 -18
package/README.md CHANGED
@@ -6,11 +6,11 @@ Points:
6
6
 
7
7
  - Inject file names with hashes
8
8
  - Watch on a template file and trigger rebuild if it is changed
9
- - Provides minimalistic template by default, so you are ready to start without configuration
9
+ - Provides a minimalistic template by default, so you are ready to start without configuration
10
10
  - Supports multiple rollup configs (will trigger only when last output generated)
11
- - Extensible through API so you can plug in something for html processing or generate new types of html elements
11
+ - Extensible through API so you can plug in something for HTML processing or generate new types of HTML elements
12
12
 
13
- Uses [`@niceties/logger`](https://github.com/kshutkin/niceties/blob/main/logger/README.md) to log messages, can be configured through `@niceties/logger` API.
13
+ Uses [`@niceties/logger`](https://github.com/kshutkin/niceties/blob/main/logger/README.md) to log messages, which can be configured through `@niceties/logger` API.
14
14
 
15
15
  [Changelog](./CHANGELOG.md)
16
16
 
@@ -40,13 +40,13 @@ export default {
40
40
 
41
41
  ## Providing options
42
42
 
43
- Just pass options to the plugin function. Returned object is the plugin instance which can be passed to rollup.
43
+ Just pass options to the plugin function. The returned object is the plugin instance which can be passed to rollup.
44
44
 
45
45
  ```javascript
46
46
  html({option: value, option2: value2})
47
47
  ```
48
48
 
49
- For additional plugin instances (in case of multiple configs) please use: `firstInstance.api.addInstance()`
49
+ For additional plugin instances (in case of multiple configs) please use `firstInstance.api.addInstance()`
50
50
 
51
51
  ## Options
52
52
 
@@ -60,7 +60,7 @@ For debugging purposes, so many instances of a plugin can be differentiated in d
60
60
 
61
61
  Optional, string, default: `'index.html'`.
62
62
 
63
- Used to override output file name. If a filename with the same name exists in the pipeline it will be removed or overwritten in the process but its content by default will be used as an input for this plugin. In the following example file emitted by copy plugin will be used as an input for this plugin:
63
+ Used to override output file name. If a filename with the same name exists in the pipeline it will be removed or overwritten in the process but its content by default will be used as input for this plugin. In the following example file emitted by copy plugin will be used as input for this plugin:
64
64
 
65
65
  ```javascript
66
66
  import copy from '@rollup-extras/plugin-copy';
@@ -94,19 +94,19 @@ If the plugin found a template file name this option defines if the plugin needs
94
94
 
95
95
  Optional, boolean, default: true.
96
96
 
97
- Defines if the plugin should use this.emitFile or should just write it to disk. Option can be ignored in setup with multiple rollup configs.
97
+ Defines if the plugin should use this.emitFile or should just write it to disk. The option can be ignored in setup with multiple rollup configs.
98
98
 
99
99
  ### useEmittedTemplate
100
100
 
101
101
  Optional, boolean, default: true.
102
102
 
103
- Defines what the plugin does if it finds a file with the expected file name in the bundle. By default it will be used as a template. Templates provided through the template option should be of higher priority to the plugin.
103
+ Defines what the plugin does if it finds a file with the expected file name in the bundle. By default, it will be used as a template. Templates provided through the template option should be of higher priority to the plugin.
104
104
 
105
105
  ### conditionalLoading
106
106
 
107
107
  Optional, boolean, default: undefined.
108
108
 
109
- Defines if plugin adds `nomodule` attribute for non modular js chunks. By default it is done only if we have `es` outputs in one of the bundles processed by the plugin. Also plugin values `iife` outputs higher than `umd` and if we have both filters out `umd` ones. This can be changed only by providing custom `assetFactory`.
109
+ Defines if the plugin adds `nomodule` attributes for non-modular js chunks. By default, it is done only if we have an `es` output in one of the bundles processed by the plugin. Also plugin values `iife` outputs higher than `umd` and if we have both filters out `umd` ones. This can be changed only by providing a custom `assetFactory`.
110
110
 
111
111
  ### injectIntoHead
112
112
 
@@ -216,7 +216,7 @@ Creates a simple module script element.
216
216
 
217
217
  `(...factories: AssetFactory[]) => AssetFactory`
218
218
 
219
- Combines several factories, calls them in order, the first factory created asset wins.
219
+ Combines several factories, and calls them in order, the first factory-created asset wins.
220
220
 
221
221
  ## Configuration
222
222
 
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
- "version": "1.4.1",
3
- "license": "MIT",
4
- "name": "@rollup-extras/plugin-html",
5
- "author": {
6
- "name": "Konstantin Shutkin"
7
- },
8
2
  "type": "module",
3
+ "version": "1.4.3",
4
+ "name": "@rollup-extras/plugin-html",
5
+ "description": "Rollup plugin to inject assets names into html template.",
6
+ "license": "MIT",
7
+ "author": "Konstantin Shutkin",
8
+ "main": "./dist/index.cjs",
9
+ "module": "./dist/index.mjs",
9
10
  "exports": {
10
11
  ".": {
11
12
  "require": "./dist/index.cjs",
@@ -17,9 +18,6 @@
17
18
  },
18
19
  "./package.json": "./package.json"
19
20
  },
20
- "main": "./dist/index.cjs",
21
- "module": "./dist/index.mjs",
22
- "typings": "./dist/index.d.ts",
23
21
  "files": [
24
22
  "dist",
25
23
  "LICENSE",
@@ -30,19 +28,21 @@
30
28
  },
31
29
  "repository": {
32
30
  "type": "git",
33
- "url": "git+https://github.com/kshutkin/rollup-extras.git"
34
- },
35
- "bugs": {
36
- "url": "https://github.com/kshutkin/rollup-extras/issues"
31
+ "url": "git+https://github.com/kshutkin/rollup-extras.git",
32
+ "directory": "plugin-html"
37
33
  },
34
+ "bugs": "https://github.com/kshutkin/rollup-extras/issues",
38
35
  "homepage": "https://github.com/kshutkin/rollup-extras/blob/main/plugin-html/README.md",
39
36
  "readme": "README.md",
40
- "description": "Rollup plugin to inject assets names into html template.",
41
37
  "keywords": [
42
38
  "rollup-plugin",
43
39
  "html",
44
40
  "bundle"
45
41
  ],
42
+ "dependencies": {
43
+ "@niceties/logger": "^1.1.4",
44
+ "@rollup-extras/utils": "^1.4.3"
45
+ },
46
46
  "peerDependencies": {
47
47
  "rollup": "^2.60.1 || ^3.0.0"
48
48
  },
@@ -51,10 +51,7 @@
51
51
  "optional": true
52
52
  }
53
53
  },
54
- "dependencies": {
55
- "@niceties/logger": "^1.1.4",
56
- "@rollup-extras/utils": "^1.4.1"
57
- },
54
+ "types": "./dist/index.d.ts",
58
55
  "scripts": {
59
56
  "build": "pkgbld-internal",
60
57
  "test": "jest --collectCoverage",