@ts-for-gir/generator-html-doc 4.0.0-beta.4 → 4.0.0-beta.40

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/README.md CHANGED
@@ -16,5 +16,18 @@
16
16
  <img src="https://raw.githubusercontent.com/gjsify/ts-for-gir/main/.github/feeling.gif" />
17
17
  </p>
18
18
 
19
- # Generator base
20
- HTML Documentation generator for ts-for-gir.
19
+ # HTML Documentation Generator
20
+
21
+ ## Status: Not Yet Implemented
22
+
23
+ This package currently serves as a placeholder and basic framework for implementing an HTML documentation generator based on GIR types. It does not contain actual functionality yet.
24
+
25
+ ## Purpose
26
+
27
+ The intended purpose of this package is to provide a way to generate HTML documentation from GObject introspection data, similar to how the `generator-typescript` package generates TypeScript definitions. When implemented, it would allow for generating human-readable API documentation websites.
28
+
29
+ ## Implementation
30
+
31
+ This package implements the `Generator` interface from `@ts-for-gir/generator-base` but its methods currently throw "Not implemented" errors. It provides the basic structure needed for anyone who wants to implement a full HTML documentation generator for GObject introspection types.
32
+
33
+ If you're interested in implementing this feature, contributions are welcome! Feel free to use this package as a starting point for building a complete HTML documentation generator.
package/package.json CHANGED
@@ -1,29 +1,23 @@
1
1
  {
2
2
  "name": "@ts-for-gir/generator-html-doc",
3
- "version": "4.0.0-beta.4",
3
+ "version": "4.0.0-beta.40",
4
4
  "description": "HTML Documentation generator for ts-for-gir",
5
- "module": "lib/index.js",
6
- "main": "lib/index.js",
5
+ "main": "src/index.ts",
6
+ "module": "src/index.ts",
7
7
  "type": "module",
8
8
  "engines": {
9
9
  "node": ">=18"
10
10
  },
11
11
  "scripts": {
12
- "build": "yarn lint && yarn build:ts",
13
- "build:ts": "tsc",
14
- "clear": "yarn clear:build",
15
- "clear:build": "rimraf ./lib",
16
- "watch": "yarn build:ts --watch",
17
- "lint": "eslint . --ext .ts,.tsx --fix"
12
+ "check": "tsc --noEmit"
18
13
  },
19
14
  "repository": {
20
15
  "type": "git",
21
16
  "url": "git+https://github.com/gjsify/ts-for-gir.git"
22
17
  },
23
- "author": "Pascal Garber <pascal@artandcode.studio>",
18
+ "author": "Pascal Garber <pascal@mailfreun.de>",
24
19
  "files": [
25
- "lib",
26
- "templates"
20
+ "src"
27
21
  ],
28
22
  "license": "Apache-2.0",
29
23
  "bugs": {
@@ -31,21 +25,21 @@
31
25
  },
32
26
  "homepage": "https://github.com/gjsify/ts-for-gir#readme",
33
27
  "keywords": [
34
- "generator"
28
+ "generator",
29
+ "html",
30
+ "documentation",
31
+ "gir"
35
32
  ],
33
+ "exports": {
34
+ ".": "./src/index.ts"
35
+ },
36
36
  "devDependencies": {
37
- "@types/node": "^20.12.8",
38
- "@typescript-eslint/eslint-plugin": "^7.8.0",
39
- "@typescript-eslint/parser": "^7.8.0",
40
- "eslint": "^8.57.0",
41
- "eslint-config-prettier": "^9.1.0",
42
- "eslint-plugin-prettier": "^5.1.3",
43
- "prettier": "^3.2.5",
44
- "rimraf": "^5.0.5",
45
- "typescript": "^5.4.5"
37
+ "@types/node": "^24.11.0",
38
+ "rimraf": "^6.1.3",
39
+ "typescript": "^5.9.3"
46
40
  },
47
41
  "dependencies": {
48
- "@ts-for-gir/generator-base": "^4.0.0-beta.4",
49
- "@ts-for-gir/lib": "^4.0.0-beta.4"
42
+ "@ts-for-gir/generator-base": "^4.0.0-beta.40",
43
+ "@ts-for-gir/lib": "^4.0.0-beta.40"
50
44
  }
51
45
  }
@@ -0,0 +1,29 @@
1
+ import type { Generator } from "@ts-for-gir/generator-base";
2
+ import type { GirModule, NSRegistry, OptionsGeneration } from "@ts-for-gir/lib";
3
+ import { DANGER_HTML_DOC_GENERATOR_NOT_IMPLEMENTED, Logger } from "@ts-for-gir/lib";
4
+
5
+ /**
6
+ * A template that can be used to implement an HTML Documentation Generator
7
+ */
8
+ export class HtmlDocGenerator implements Generator {
9
+ protected log: Logger;
10
+ protected readonly config: OptionsGeneration;
11
+ protected readonly registry: NSRegistry;
12
+ constructor(config: OptionsGeneration, registry: NSRegistry) {
13
+ this.config = config;
14
+ this.registry = registry;
15
+ this.log = new Logger(config.verbose, HtmlDocGenerator.name);
16
+ }
17
+
18
+ async start(): Promise<void> {
19
+ return Promise.resolve(this.log.danger(DANGER_HTML_DOC_GENERATOR_NOT_IMPLEMENTED));
20
+ }
21
+
22
+ generate(_module: GirModule): Promise<void> {
23
+ throw new Error("Method not implemented.");
24
+ }
25
+
26
+ finish(_girModules: GirModule[]): Promise<void> {
27
+ throw new Error("Method not implemented.");
28
+ }
29
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./html-doc-generator.ts";
@@ -1,14 +0,0 @@
1
- import { Logger } from '@ts-for-gir/lib';
2
- import { Generator } from '@ts-for-gir/generator-base';
3
- import type { OptionsGeneration, GirModule, NSRegistry } from '@ts-for-gir/lib';
4
- /**
5
- * A template that can be used to implement an HTML Documentation Generator
6
- */
7
- export declare class HtmlDocGenerator implements Generator {
8
- protected readonly config: OptionsGeneration;
9
- protected log: Logger;
10
- constructor(config: OptionsGeneration);
11
- start(_registry: NSRegistry): Promise<void>;
12
- generate(_registry: NSRegistry, _module: GirModule): Promise<void>;
13
- finish(_registry: NSRegistry): Promise<void>;
14
- }
@@ -1,23 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- import { Logger, DANGER_HTML_DOC_GENERATOR_NOT_IMPLEMENTED } from '@ts-for-gir/lib';
3
- /**
4
- * A template that can be used to implement an HTML Documentation Generator
5
- */
6
- export class HtmlDocGenerator {
7
- config;
8
- log;
9
- constructor(config) {
10
- this.config = config;
11
- this.log = new Logger(config.verbose, HtmlDocGenerator.name);
12
- }
13
- async start(_registry) {
14
- return Promise.resolve(this.log.danger(DANGER_HTML_DOC_GENERATOR_NOT_IMPLEMENTED));
15
- }
16
- generate(_registry, _module) {
17
- throw new Error('Method not implemented.');
18
- }
19
- finish(_registry) {
20
- throw new Error('Method not implemented.');
21
- }
22
- }
23
- //# sourceMappingURL=html-doc-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html-doc-generator.js","sourceRoot":"","sources":["../src/html-doc-generator.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,MAAM,EAAE,yCAAyC,EAAE,MAAM,iBAAiB,CAAA;AAKnF;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAEM;IADrB,GAAG,CAAQ;IACrB,YAA+B,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;QACpD,IAAI,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAA;IAChE,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,SAAqB;QAC7B,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAC,CAAA;IACtF,CAAC;IAED,QAAQ,CAAC,SAAqB,EAAE,OAAkB;QAC9C,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC9C,CAAC;IAED,MAAM,CAAC,SAAqB;QACxB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC9C,CAAC;CACJ"}
package/lib/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './html-doc-generator.js';
package/lib/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from './html-doc-generator.js';
2
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}