@test2doc/playwright 0.1.1 → 0.2.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/README.md +103 -34
- package/dist/{DocHeader.d.ts → DocMeta.d.ts} +30 -1
- package/dist/DocMeta.d.ts.map +1 -0
- package/dist/{DocHeader.js → DocMeta.js} +4 -2
- package/dist/DocMeta.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -10
- package/dist/index.js.map +1 -1
- package/package.json +9 -7
- package/dist/DocHeader.d.ts.map +0 -1
- package/dist/DocHeader.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
The Test2Doc is a project that generates documentation based on tests, helping you keep your technical documentation automatically in sync with your code.
|
|
2
2
|
|
|
3
3
|
# Test2Doc Playwright Reporter
|
|
4
|
-
The `@test2doc/playwright` package is a [Playwright](https://playwright.dev/) reporter that generates documentation in markdown. It
|
|
4
|
+
The `@test2doc/playwright` package is a [Playwright](https://playwright.dev/) reporter that generates documentation in markdown. It generates markdown files compatible with [Docusaurus](https://docusaurus.io/).
|
|
5
5
|
|
|
6
6
|
## Installation & Setup
|
|
7
7
|
|
|
8
|
-
###
|
|
8
|
+
### Prerequisites
|
|
9
|
+
|
|
10
|
+
#### Playwright
|
|
9
11
|
If you don't have Playwright currently installed, you can follow [Playwright's installation guide](https://playwright.dev/docs/intro#installing-playwright). (Don't forget to run `npx playwright install` to install browsers after Playwright itself!)
|
|
10
12
|
|
|
13
|
+
#### Docusaurus
|
|
14
|
+
This reporter generates markdown files for Docusaurus. If you don't have a Docusaurus app set up yet there is an install guide [here](https://docusaurus.io/docs/installation). If you have a monorepo I recommend using these [instructions](https://docusaurus.io/docs/installation#monorepos)
|
|
15
|
+
|
|
16
|
+
Else you can install the Docusaurus app within your current repo with:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npx create-docusaurus@latest doc classic --typescript
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This will make a `doc` directory with your Docusaurus app.
|
|
23
|
+
|
|
24
|
+
### Install the Reporter
|
|
11
25
|
After installing Playwright you can add the `@test2doc/playwright` with your package manager of choice:
|
|
12
26
|
|
|
13
27
|
```sh
|
|
@@ -19,52 +33,67 @@ yarn add @test2doc/playwright --dev
|
|
|
19
33
|
pnpm install @test2doc/playwright -D
|
|
20
34
|
```
|
|
21
35
|
|
|
22
|
-
#### Configure Playwright
|
|
23
|
-
|
|
36
|
+
#### Configure Playwright to work with Test2Doc's Reporter
|
|
37
|
+
Create a new config to run Test2Doc. `playwright-test2doc.config.ts`
|
|
24
38
|
|
|
25
39
|
```ts
|
|
26
|
-
// playwright.config.ts
|
|
27
|
-
import { defineConfig,
|
|
28
|
-
|
|
29
|
-
...
|
|
40
|
+
// playwright-test2doc.config.ts
|
|
41
|
+
import { defineConfig, devices } from "@playwright/test"
|
|
30
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Test2Doc Playwright Configuration
|
|
45
|
+
* This config is optimized for generating documentation from your tests.
|
|
46
|
+
*/
|
|
31
47
|
export default defineConfig({
|
|
32
|
-
|
|
48
|
+
// Test directory - adjust to match your project structure
|
|
49
|
+
testDir: './tests',
|
|
50
|
+
|
|
51
|
+
// Test2Doc Reporter Configuration
|
|
33
52
|
reporter: [
|
|
34
|
-
|
|
35
|
-
|
|
53
|
+
['@test2doc/playwright', {
|
|
54
|
+
outputDir: './doc/docs' // Change this to your Docusaurus docs directory
|
|
55
|
+
}]
|
|
36
56
|
],
|
|
37
|
-
...
|
|
38
|
-
})
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Replace `"./path/to/docs"` with a path to the `doc` directory of your Docusaurus app.
|
|
42
57
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
// Optimized settings for doc generation
|
|
59
|
+
fullyParallel: false,
|
|
60
|
+
workers: 1, // Single worker for consistent output
|
|
61
|
+
retries: 0, // No retries needed for doc generation
|
|
62
|
+
|
|
63
|
+
// Use only one browser for faster doc generation
|
|
64
|
+
projects: [
|
|
65
|
+
{
|
|
66
|
+
name: 'chromium',
|
|
67
|
+
use: { ...devices['Desktop Chrome'] },
|
|
68
|
+
},
|
|
69
|
+
],
|
|
47
70
|
|
|
48
|
-
|
|
49
|
-
|
|
71
|
+
// Optional: Import settings from your main config
|
|
72
|
+
// Uncomment and adjust the path if you want to inherit from your main config
|
|
73
|
+
// ...require('./playwright.config').default,
|
|
74
|
+
});
|
|
50
75
|
```
|
|
51
76
|
|
|
52
|
-
|
|
77
|
+
Replace `"./doc/docs"` with a path to the `doc` directory of your Docusaurus app.
|
|
53
78
|
|
|
54
|
-
|
|
79
|
+
##### Add script to run playwright to generate docs
|
|
55
80
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
81
|
+
Also add a script to build the docs in your project's `package.json`
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
59
85
|
...
|
|
60
|
-
|
|
86
|
+
"scripts": {
|
|
61
87
|
...
|
|
62
|
-
|
|
63
|
-
|
|
88
|
+
"docs:generate": "playwright test --config=playwright-test2doc.config.ts"
|
|
89
|
+
}
|
|
64
90
|
...
|
|
65
|
-
}
|
|
91
|
+
}
|
|
66
92
|
```
|
|
67
93
|
|
|
94
|
+
## Verify installation
|
|
95
|
+
To verify your setup works, run `npm run docs:generate` and check that markdown files appear in your `./doc/docs` directory.
|
|
96
|
+
|
|
68
97
|
## How it works
|
|
69
98
|
|
|
70
99
|
After this setup, every time you run your Playwright tests, the `@test2doc/playwright` reporter will automatically generate a new markdown file in your specified Docusaurus docs directory for each top-level describe block found in your Playwright test files.
|
|
@@ -75,7 +104,47 @@ Docusaurus supports [markdown front matter](https://docusaurus.io/docs/api/plugi
|
|
|
75
104
|
To add this metadata to the test2doc markdown files that are generated use the `withDocMeta` function in your top level describe block in your test.
|
|
76
105
|
|
|
77
106
|
```ts
|
|
78
|
-
import {withDocMeta} from "@test2doc/playwright/
|
|
107
|
+
import { withDocMeta } from "@test2doc/playwright/DocMeta";
|
|
108
|
+
|
|
109
|
+
...
|
|
110
|
+
|
|
111
|
+
describe(withDocMeta("Title of Page", {
|
|
112
|
+
title: "Title in Sidebar",
|
|
113
|
+
sidebar_position: 1,
|
|
114
|
+
...
|
|
115
|
+
}), () => {
|
|
116
|
+
test("test block", () => {
|
|
117
|
+
...
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Adding Docusaurus Category route
|
|
123
|
+
Docusaurus supports grouping docs by [category](https://docusaurus.io/docs/sidebar/autogenerated#category-item-metadata).
|
|
124
|
+
|
|
125
|
+
By using the `withDocCategory` function for a describe block's title, this will add the metadata to allow Test2Doc to generate a new directory and a `__category__.json` file. It will then place all subsequent describes and tests under this new route.
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
|
|
129
|
+
import { withDocCategory, withDocMeta } from "@test2doc/playwright/DocMeta";
|
|
130
|
+
|
|
131
|
+
...
|
|
79
132
|
|
|
80
|
-
describe(
|
|
81
|
-
|
|
133
|
+
describe(withDocCategory("Title of Category Route", {
|
|
134
|
+
label: "Category Sidebar Label",
|
|
135
|
+
position: 1,
|
|
136
|
+
className: "class-to-add-on-sidebar-label",
|
|
137
|
+
...
|
|
138
|
+
}),
|
|
139
|
+
() => {
|
|
140
|
+
describe(withDocMeta("Title of Page in Category", {
|
|
141
|
+
title: "Title in Sidebar under Category",
|
|
142
|
+
sidebar_position: 1,
|
|
143
|
+
...
|
|
144
|
+
}), () => {
|
|
145
|
+
test("test block", () => {
|
|
146
|
+
...
|
|
147
|
+
})
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
```
|
|
@@ -9,6 +9,7 @@ export interface DocusaurusHeaderConfig {
|
|
|
9
9
|
image?: string;
|
|
10
10
|
[key: string]: string | number | boolean | string[];
|
|
11
11
|
}
|
|
12
|
+
export type metadataType = "page" | "category";
|
|
12
13
|
/**
|
|
13
14
|
* activateTest2Doc - Activates withDocMeta to add Docusaurus Page Meta Data to Describe Title.
|
|
14
15
|
*/
|
|
@@ -21,4 +22,32 @@ export declare const activateTest2Doc: () => void;
|
|
|
21
22
|
* @returns The title with appended JSON string of config if test2doc is active, otherwise just the title.
|
|
22
23
|
*/
|
|
23
24
|
export declare const withDocMeta: (title: string, config: DocusaurusHeaderConfig) => string;
|
|
24
|
-
|
|
25
|
+
interface DocusaurusCategoryLinkGeneratedIndex {
|
|
26
|
+
type: "generated-index";
|
|
27
|
+
title?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
slug?: string;
|
|
30
|
+
keywords?: string[];
|
|
31
|
+
image?: string;
|
|
32
|
+
}
|
|
33
|
+
interface DocusaurusCategoryLinkDoc {
|
|
34
|
+
type: "doc";
|
|
35
|
+
id: string;
|
|
36
|
+
}
|
|
37
|
+
interface DocusaurusCategoryLinkExternal {
|
|
38
|
+
type: "link";
|
|
39
|
+
href: string;
|
|
40
|
+
}
|
|
41
|
+
type DocusaurusCategoryLink = DocusaurusCategoryLinkGeneratedIndex | DocusaurusCategoryLinkDoc | DocusaurusCategoryLinkExternal;
|
|
42
|
+
export interface DocusaurusCategoryMetadata {
|
|
43
|
+
label?: string;
|
|
44
|
+
position?: number;
|
|
45
|
+
link?: DocusaurusCategoryLink;
|
|
46
|
+
collapsible?: boolean;
|
|
47
|
+
collapsed?: boolean;
|
|
48
|
+
className?: string;
|
|
49
|
+
customProps?: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
export declare const withDocCategory: (title: string, metadata: DocusaurusCategoryMetadata) => string;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=DocMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocMeta.d.ts","sourceRoot":"","sources":["../src/DocMeta.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAA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AAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACtC;AAED,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,EACb,UAAU,0BAA0B,KACnC,MACqE,CAAA"}
|
|
@@ -13,5 +13,7 @@ export const activateTest2Doc = () => {
|
|
|
13
13
|
* For a list of fields for the config see https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter
|
|
14
14
|
* @returns The title with appended JSON string of config if test2doc is active, otherwise just the title.
|
|
15
15
|
*/
|
|
16
|
-
export const withDocMeta = (title, config) => test2docActive ? title
|
|
17
|
-
|
|
16
|
+
export const withDocMeta = (title, config) => test2docActive ? addConfigToTitle(title, config, "page") : title;
|
|
17
|
+
const addConfigToTitle = (title, config, metaType) => `${title}[test2doc_${metaType}]:${JSON.stringify(config)}`;
|
|
18
|
+
export const withDocCategory = (title, metadata) => test2docActive ? addConfigToTitle(title, metadata, "category") : title;
|
|
19
|
+
//# sourceMappingURL=DocMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocMeta.js","sourceRoot":"","sources":["../src/DocMeta.ts"],"names":[],"mappings":"AAeA,0BAA0B;AAC1B,IAAI,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AAExD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,cAAc,GAAG,IAAI,CAAA;AACvB,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,MAA8B,EAAE,EAAE,CAC3E,cAAc,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;AAElE,MAAM,gBAAgB,GAAG,CACvB,KAAa,EACb,MAA2D,EAC3D,QAAsB,EACd,EAAE,CAAC,GAAG,KAAK,aAAa,QAAQ,KAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAA;AAoCvE,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAAa,EACb,QAAoC,EAC5B,EAAE,CACV,cAAc,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ declare class Test2DocReporter implements Reporter {
|
|
|
17
17
|
onStepBegin(test: TestCase, _result: TestResult, step: TestStep): void;
|
|
18
18
|
private convertToKebabCase;
|
|
19
19
|
onEnd(): void;
|
|
20
|
+
private buildDocFiles;
|
|
20
21
|
private extractDocMetadata;
|
|
21
22
|
private generateHeader;
|
|
22
23
|
private generateTitle;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACT,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACT,MAAM,2BAA2B,CAAA;AAsBlC,UAAU,uBAAuB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAuBD;;;GAGG;AACH,cAAM,gBAAiB,YAAW,QAAQ;IACxC,OAAO,CAAC,IAAI,CAAgB;IAC5B,OAAO,CAAC,MAAM,CAA4C;IAC1D,OAAO,CAAC,SAAS,CAAQ;gBAGvB,OAAO,GAAE,uBAER;IAKH,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK;IAUzC,OAAO,CAAC,YAAY;IAyBpB,WAAW,CAAC,IAAI,EAAE,QAAQ;IAM1B,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI;IAYtE,OAAO,CAAC,kBAAkB;IAO1B,KAAK;IAIL,OAAO,CAAC,aAAa;IAyBrB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,cAAc;IAiCtB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,gBAAgB;CAuBzB;AAED,eAAe,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { writeFileSync } from "node:fs";
|
|
2
|
-
import { activateTest2Doc } from "./
|
|
1
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { activateTest2Doc } from "./DocMeta.js";
|
|
3
3
|
activateTest2Doc();
|
|
4
4
|
/**
|
|
5
5
|
* Test2DocReporter is a Playwright reporter that generates documentation
|
|
@@ -65,19 +65,35 @@ class Test2DocReporter {
|
|
|
65
65
|
.replace(/[^a-z0-9]+/g, "-");
|
|
66
66
|
}
|
|
67
67
|
onEnd() {
|
|
68
|
-
this.docs.forEach((doc) =>
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
this.docs.forEach((doc) => this.buildDocFiles(doc));
|
|
69
|
+
}
|
|
70
|
+
buildDocFiles(doc, outputDir = this.outputDir) {
|
|
71
|
+
const [title, metadata, metaType] = this.extractDocMetadata(doc.title);
|
|
72
|
+
if (metaType === "page") {
|
|
71
73
|
const markdownHeader = this.generateHeader(metadata);
|
|
72
74
|
const markdown = markdownHeader + this.generateMarkdown({ ...doc, title }, 1);
|
|
73
|
-
const filePath = `${
|
|
75
|
+
const filePath = `${outputDir}/${this.convertToKebabCase(title)}.md`;
|
|
76
|
+
writeFileSync(filePath, markdown);
|
|
77
|
+
}
|
|
78
|
+
else if (metaType === "category") {
|
|
79
|
+
const filePath = `${outputDir}/${this.convertToKebabCase(title)}`;
|
|
80
|
+
mkdirSync(filePath, { recursive: true });
|
|
81
|
+
writeFileSync(`${filePath}/__category__.json`, JSON.stringify(metadata, null, 2));
|
|
82
|
+
doc.children.forEach((child) => this.buildDocFiles(child, filePath));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
const markdown = this.generateMarkdown(doc, 1);
|
|
86
|
+
const filePath = `${outputDir}/${this.convertToKebabCase(doc.title)}.md`;
|
|
74
87
|
writeFileSync(filePath, markdown);
|
|
75
|
-
}
|
|
88
|
+
}
|
|
76
89
|
}
|
|
77
90
|
extractDocMetadata(docTitle) {
|
|
78
|
-
const [_ignore, title, metadataJson] = docTitle.match(/^(.*?)\
|
|
79
|
-
|
|
80
|
-
|
|
91
|
+
const [_ignore, title, metaType, metadataJson] = docTitle.match(/^(.*?)\[test2doc_(.+)\]:(.+)$/) ?? [];
|
|
92
|
+
return [
|
|
93
|
+
title ?? docTitle,
|
|
94
|
+
metadataJson ? JSON.parse(metadataJson) : {},
|
|
95
|
+
metaType,
|
|
96
|
+
];
|
|
81
97
|
}
|
|
82
98
|
generateHeader(metadata) {
|
|
83
99
|
let header = "---\n";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AA2C/C,gBAAgB,EAAE,CAAA;AAElB;;;GAGG;AACH,MAAM,gBAAgB;IACZ,IAA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B,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA;YACrD,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAED,eAAe,gBAAgB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@test2doc/playwright",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A reporter that generates docs based off playwright test files",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -14,11 +14,13 @@
|
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
16
|
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.js",
|
|
17
18
|
"types": "./dist/index.d.ts"
|
|
18
19
|
},
|
|
19
|
-
"./
|
|
20
|
-
"import": "./dist/
|
|
21
|
-
"
|
|
20
|
+
"./DocMeta": {
|
|
21
|
+
"import": "./dist/DocMeta.js",
|
|
22
|
+
"require": "./dist/DocMeta.js",
|
|
23
|
+
"types": "./dist/DocMeta.d.ts"
|
|
22
24
|
}
|
|
23
25
|
},
|
|
24
26
|
"main": "dist/index.js",
|
|
@@ -26,8 +28,8 @@
|
|
|
26
28
|
"types": "dist/index.d.ts",
|
|
27
29
|
"files": [
|
|
28
30
|
"dist",
|
|
29
|
-
"dist/
|
|
30
|
-
"dist/
|
|
31
|
+
"dist/DocMeta.js",
|
|
32
|
+
"dist/DocMeta.d.ts"
|
|
31
33
|
],
|
|
32
34
|
"publishConfig": {
|
|
33
35
|
"access": "public"
|
|
@@ -37,7 +39,7 @@
|
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
41
|
"vitest": "^3.2.4",
|
|
40
|
-
"@types/node": "^24.0.
|
|
42
|
+
"@types/node": "^24.0.4"
|
|
41
43
|
},
|
|
42
44
|
"scripts": {
|
|
43
45
|
"clean": "rm -rf dist",
|
package/dist/DocHeader.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DocHeader.d.ts","sourceRoot":"","sources":["../src/DocHeader.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAA;CACpD;AAKD;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAE5B,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,QAAQ,sBAAsB,WAChB,CAAA"}
|
package/dist/DocHeader.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DocHeader.js","sourceRoot":"","sources":["../src/DocHeader.ts"],"names":[],"mappings":"AAaA,0BAA0B;AAC1B,IAAI,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AAExD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,cAAc,GAAG,IAAI,CAAA;AACvB,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,MAA8B,EAAE,EAAE,CAC3E,cAAc,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA"}
|