@rspack/dev-server 0.0.0-20220909025136

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/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # rspack-dev-server
2
+
3
+ ## 0.0.0-20220909025136
4
+
5
+ ### Patch Changes
6
+
7
+ - 53ee00d1: test alpha publish
8
+
9
+ ## 0.0.6
10
+
11
+ ### Patch Changes
12
+
13
+ - e6d0926a: unify version
14
+
15
+ ## 0.0.4
16
+
17
+ ### Patch Changes
18
+
19
+ - d466288: add process_assets hook
20
+
21
+ ## 0.0.3
22
+
23
+ ### Patch Changes
24
+
25
+ - 536f6f70: fix broken lib
26
+
27
+ ## 0.0.2
28
+
29
+ ### Patch Changes
30
+
31
+ - bd57e818: first release
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # rspack-dev-server
@@ -0,0 +1 @@
1
+ export * from "./server";
package/dist/index.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./server"), exports);
@@ -0,0 +1,2 @@
1
+ import express from "express";
2
+ export declare function createServer(options: any): Promise<express.Express>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createServer = void 0;
7
+ const express_1 = __importDefault(require("express"));
8
+ async function createServer(options) {
9
+ const { dev: { static: { directory = "dist" } = {} } = {} } = options || {};
10
+ const app = (0, express_1.default)();
11
+ app.use(express_1.default.static(directory));
12
+ return app;
13
+ }
14
+ exports.createServer = createServer;
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@rspack/dev-server",
3
+ "description": "",
4
+ "version": "0.0.0-20220909025136",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "author": "",
8
+ "license": "ISC",
9
+ "devDependencies": {
10
+ "@types/node": "^18.6.3",
11
+ "tsm": "^2.2.2",
12
+ "typescript": "^4.7.4"
13
+ },
14
+ "dependencies": {
15
+ "@types/express": "^4.17.13",
16
+ "chalk": "^5.0.1",
17
+ "express": "^4.18.1"
18
+ },
19
+ "scripts": {
20
+ "build": "rm -rf dist/ && tsc -p tsconfig.json",
21
+ "dev": "tsc -p tsconfig.json -w",
22
+ "test": "echo \"Error: no test specified\" && exit 1"
23
+ }
24
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./server";
@@ -0,0 +1,11 @@
1
+ import express from "express";
2
+
3
+ export async function createServer(options): Promise<express.Express> {
4
+ const { dev: { static: { directory = "dist" } = {} } = {} } = options || {};
5
+
6
+ const app = express();
7
+
8
+ app.use(express.static(directory));
9
+
10
+ return app;
11
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "CommonJS",
4
+ "target": "ES2018",
5
+ "moduleResolution": "node",
6
+ "esModuleInterop": true,
7
+ "outDir": "dist",
8
+ "declaration": true
9
+ },
10
+ "include": [
11
+ "src"
12
+ ]
13
+ }