docula 0.9.6 → 0.10.1

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/dist/docula.d.ts CHANGED
@@ -131,7 +131,7 @@ declare class Docula {
131
131
  * @param {DoculaOptions} options
132
132
  * @returns {Promise<void>}
133
133
  */
134
- serve(options: DoculaOptions): Promise<void>;
134
+ serve(options: DoculaOptions): Promise<http.Server>;
135
135
  }
136
136
 
137
137
  export { DoculaHelpers, Docula as default };
package/dist/docula.js CHANGED
@@ -1,9 +1,10 @@
1
1
  // src/docula.ts
2
+ import http from "node:http";
2
3
  import path3 from "node:path";
3
4
  import process3 from "node:process";
4
5
  import fs3 from "node:fs";
6
+ import handler from "serve-handler";
5
7
  import updateNotifier from "update-notifier";
6
- import express from "express";
7
8
 
8
9
  // src/options.ts
9
10
  import path from "node:path";
@@ -892,13 +893,21 @@ var Docula = class {
892
893
  if (this._server) {
893
894
  this._server.close();
894
895
  }
895
- const app = express();
896
896
  const { port } = options;
897
897
  const { outputPath } = options;
898
- app.use(express.static(outputPath));
899
- this._server = app.listen(port, () => {
898
+ const config = {
899
+ public: outputPath
900
+ };
901
+ this._server = http.createServer(
902
+ async (request, response) => (
903
+ /* c8 ignore next */
904
+ handler(request, response, config)
905
+ )
906
+ );
907
+ this._server.listen(port, () => {
900
908
  this._console.log(`Docula \u{1F987} at http://localhost:${port}`);
901
909
  });
910
+ return this._server;
902
911
  }
903
912
  };
904
913
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docula",
3
- "version": "0.9.6",
3
+ "version": "0.10.1",
4
4
  "description": "Beautiful Website for Your Projects",
5
5
  "type": "module",
6
6
  "main": "./dist/docula.js",
@@ -48,25 +48,26 @@
48
48
  "dependencies": {
49
49
  "axios": "^1.7.9",
50
50
  "cheerio": "^1.0.0",
51
- "ecto": "^4.1.4",
52
- "express": "^4.21.2",
51
+ "ecto": "^4.2.0",
53
52
  "feed": "^4.2.2",
54
53
  "he": "^1.2.0",
54
+ "serve-handler": "^6.1.6",
55
55
  "update-notifier": "^7.3.1",
56
- "writr": "^4.2.0"
56
+ "writr": "^4.4.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/express": "^5.0.0",
60
60
  "@types/he": "^1.2.3",
61
61
  "@types/js-yaml": "^4.0.9",
62
- "@types/node": "^22.10.2",
62
+ "@types/node": "^22.13.4",
63
+ "@types/serve-handler": "^6.1.4",
63
64
  "@types/update-notifier": "^6.0.8",
64
- "@vitest/coverage-v8": "^2.1.8",
65
+ "@vitest/coverage-v8": "^3.0.6",
65
66
  "rimraf": "^6.0.1",
66
- "tsup": "^8.3.5",
67
- "typescript": "^5.7.2",
68
- "vitest": "^2.1.8",
69
- "webpack": "^5.97.1",
67
+ "tsup": "^8.3.6",
68
+ "typescript": "^5.7.3",
69
+ "vitest": "^3.0.6",
70
+ "webpack": "^5.98.0",
70
71
  "xo": "^0.60.0"
71
72
  },
72
73
  "xo": {