@rollup-extras/plugin-serve 1.3.1 → 1.3.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 +11 -11
  2. package/package.json +18 -21
package/README.md CHANGED
@@ -1,13 +1,13 @@
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
12
  [Changelog](./CHANGELOG.md)
13
13
 
@@ -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
 
@@ -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 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,7 +93,7 @@ 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
 
@@ -105,7 +105,7 @@ Extension point to customize `koa`.
105
105
 
106
106
  Optional, `(server: Server) => void | true`
107
107
 
108
- Extension point after server is live. Please return true to suppress the 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,7 +133,7 @@ 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
 
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
- "version": "1.3.1",
3
- "license": "MIT",
4
- "name": "@rollup-extras/plugin-serve",
5
- "author": {
6
- "name": "Konstantin Shutkin"
7
- },
8
2
  "type": "module",
3
+ "version": "1.3.3",
4
+ "name": "@rollup-extras/plugin-serve",
5
+ "description": "Rollup plugin for dev server based on koa.",
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",
@@ -13,9 +14,6 @@
13
14
  },
14
15
  "./package.json": "./package.json"
15
16
  },
16
- "main": "./dist/index.cjs",
17
- "module": "./dist/index.mjs",
18
- "typings": "./dist/index.d.ts",
19
17
  "files": [
20
18
  "dist",
21
19
  "LICENSE"
@@ -25,19 +23,24 @@
25
23
  },
26
24
  "repository": {
27
25
  "type": "git",
28
- "url": "git+https://github.com/kshutkin/rollup-extras.git"
29
- },
30
- "bugs": {
31
- "url": "https://github.com/kshutkin/rollup-extras/issues"
26
+ "url": "git+https://github.com/kshutkin/rollup-extras.git",
27
+ "directory": "plugin-serve"
32
28
  },
29
+ "bugs": "https://github.com/kshutkin/rollup-extras/issues",
33
30
  "homepage": "https://github.com/kshutkin/rollup-extras/blob/main/plugin-serve/README.md",
34
31
  "readme": "README.md",
35
- "description": "Rollup plugin for dev server based on koa.",
36
32
  "keywords": [
37
33
  "rollup-plugin",
38
34
  "server",
39
35
  "serve"
40
36
  ],
37
+ "dependencies": {
38
+ "koa": "^2.14.1",
39
+ "koa-static": "^5.0.0",
40
+ "koa-logger": "^3.2.1",
41
+ "@niceties/logger": "^1.1.4",
42
+ "@rollup-extras/utils": "^1.4.3"
43
+ },
41
44
  "devDependencies": {
42
45
  "@types/koa": "^2.13.4",
43
46
  "@types/koa-logger": "^3.1.2",
@@ -51,13 +54,7 @@
51
54
  "optional": true
52
55
  }
53
56
  },
54
- "dependencies": {
55
- "koa": "^2.14.1",
56
- "koa-static": "^5.0.0",
57
- "koa-logger": "^3.2.1",
58
- "@niceties/logger": "^1.1.4",
59
- "@rollup-extras/utils": "^1.4.0"
60
- },
57
+ "types": "./dist/index.d.ts",
61
58
  "scripts": {
62
59
  "build": "pkgbld-internal",
63
60
  "test": "jest --collectCoverage",