@rollup-extras/plugin-serve 1.3.0 → 1.3.2

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 +15 -15
  2. package/package.json +7 -2
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # Plugin Serve
2
2
 
3
- Rollup plugin for dev server.
3
+ Rollup plugin for a dev server.
4
4
 
5
5
  Points:
6
6
 
7
7
  - Uses `koa`, customizable through koa middleware
8
- - Zero config by default (works if you have output.dir defined)
8
+ - Zero-config by default (works if you have `output.dir` defined)
9
9
 
10
- Uses [`@niceties/logger`](https://github.com/kshutkin/niceties/blob/main/logger/README.md) to log messages, can be configured through `@niceties/logger` API.
10
+ Uses [`@niceties/logger`](https://github.com/kshutkin/niceties/blob/main/logger/README.md) to log messages, which can be configured through `@niceties/logger` API.
11
11
 
12
- [Changlelog](./CHANGELOG.md)
12
+ [Changelog](./CHANGELOG.md)
13
13
 
14
14
  ## Installation
15
15
 
@@ -37,13 +37,13 @@ export default {
37
37
 
38
38
  ## Providing options
39
39
 
40
- Just pass options to the plugin function. Returned object is the plugin instance which can be passed to rollup.
40
+ Just pass options to the plugin function. The returned object is the plugin instance which can be passed to rollup.
41
41
 
42
42
  ```javascript
43
43
  serve({option: value, option2: value2})
44
44
  ```
45
45
 
46
- For additional plugin instances (in case of multiple configs) please use: `firstInstance.api.addInstance()`
46
+ For additional plugin instances (in case of multiple configs) please use `firstInstance.api.addInstance()`
47
47
 
48
48
  ## Options
49
49
 
@@ -51,7 +51,7 @@ For additional plugin instances (in case of multiple configs) please use: `first
51
51
 
52
52
  Optional, `string`.
53
53
 
54
- For debugging purposes, so many instances of a plugin can be differenciated in debugging output.
54
+ For debugging purposes, so many instances of a plugin can be differentiated in debugging output.
55
55
 
56
56
  ### useWriteBundle
57
57
 
@@ -69,19 +69,19 @@ Defines what dir to serve using `koa-static` middleware. If you want to disable
69
69
 
70
70
  Optional, `number`, default: `8080`.
71
71
 
72
- Port to use for server.
72
+ Port to use for the server.
73
73
 
74
74
  ### host
75
75
 
76
76
  Optional, `string`.
77
77
 
78
- Host to use, by default it does not provide host to createServer and lets nodejs to decide.
78
+ Host to use, by default, does not provide a host to createServer and lets nodejs decide.
79
79
 
80
80
  ### useKoaLogger
81
81
 
82
82
  Optional, `boolean`, default: `true`.
83
83
 
84
- If plugin should use koa-logger middleware.
84
+ If the plugin should use koa-logger middleware.
85
85
 
86
86
  ### koaStaticOptions
87
87
 
@@ -93,19 +93,19 @@ Please check [`koa-static`](https://github.com/koajs/static) for options.
93
93
 
94
94
  Optional, `{ cert: string, key: string, ca?: string; }`.
95
95
 
96
- Key and certificate to use for https. Best way to generate cert and key (and to install ca) is [`mkcert`](https://github.com/FiloSottile/mkcert).
96
+ Key and certificate to use for https. The best way to generate a certificate and key (and to install ca) is [`mkcert`](https://github.com/FiloSottile/mkcert).
97
97
 
98
98
  ### customizeKoa
99
99
 
100
100
  Optional, `(koa: Koa) => void`
101
101
 
102
- Extention point to customize `koa`.
102
+ Extension point to customize `koa`.
103
103
 
104
104
  ### onListen
105
105
 
106
106
  Optional, `(server: Server) => void | true`
107
107
 
108
- Extention point after server is live. Please return true to suppress default banner.
108
+ Extension point after the server is live. Please return true to suppress the default banner.
109
109
 
110
110
  ## Configuration
111
111
 
@@ -133,8 +133,8 @@ type ServePluginOptions = {
133
133
  - https://github.com/thgh/rollup-plugin-serve
134
134
  - https://github.com/pearofducks/rollup-plugin-dev
135
135
  - https://github.com/modernweb-dev/web/tree/master/packages/dev-server-rollup
136
- - https://github.com/lukeed/sirv (and any another standalone server)
136
+ - https://github.com/lukeed/sirv
137
137
 
138
138
  # License
139
139
 
140
- [MIT](https://github.com/kshutkin/rollup-extras/blob/main/LICENSE)
140
+ [MIT](https://github.com/kshutkin/rollup-extras/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0",
2
+ "version": "1.3.2",
3
3
  "license": "MIT",
4
4
  "name": "@rollup-extras/plugin-serve",
5
5
  "author": {
@@ -46,12 +46,17 @@
46
46
  "peerDependencies": {
47
47
  "rollup": "^2.60.1 || ^3.0.0"
48
48
  },
49
+ "peerDependenciesMeta": {
50
+ "rollup": {
51
+ "optional": true
52
+ }
53
+ },
49
54
  "dependencies": {
50
55
  "koa": "^2.14.1",
51
56
  "koa-static": "^5.0.0",
52
57
  "koa-logger": "^3.2.1",
53
58
  "@niceties/logger": "^1.1.4",
54
- "@rollup-extras/utils": "^1.3.5"
59
+ "@rollup-extras/utils": "^1.4.2"
55
60
  },
56
61
  "scripts": {
57
62
  "build": "pkgbld-internal",