textrun-repo 0.2.1 → 0.3.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 +8 -11
- package/dist/executable.js +1 -1
- package/dist/existing-file-content.js +1 -1
- package/dist/existing-file.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -11,23 +11,20 @@ from the repository.
|
|
|
11
11
|
### installation
|
|
12
12
|
|
|
13
13
|
To use these actions, add this package as a development dependency by running
|
|
14
|
-
<code type="npm/install">npm i -D textrun-repo</code
|
|
15
|
-
<code type="npm/install">yarn i -D textrun-repo</code>.
|
|
14
|
+
<code type="npm/install">npm i -D textrun-repo</code>.
|
|
16
15
|
|
|
17
16
|
### repo/existing-file
|
|
18
17
|
|
|
19
18
|
Sometimes you want to mention the name of a file from your application's source
|
|
20
|
-
code in the documentation. The
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
documentation for this codebase might want to mention this configuration file:
|
|
19
|
+
code in the documentation. The <b type="action/name-full">repo/existing-file</b>
|
|
20
|
+
action verifies this. As an example, consider a codebase contains a file
|
|
21
|
+
<a type="workspace/empty-file">**config.yml**</a>. The documentation for this
|
|
22
|
+
codebase might want to mention this configuration file:
|
|
25
23
|
|
|
26
24
|
<a type="extension/runnable-region">
|
|
27
25
|
|
|
28
26
|
```markdown
|
|
29
|
-
|
|
30
|
-
values.
|
|
27
|
+
File <b type="repo/existing-file">config.yml</b> defines configuration values.
|
|
31
28
|
```
|
|
32
29
|
|
|
33
30
|
</a>
|
|
@@ -73,7 +70,7 @@ You can display its content in your documentation via this active region:
|
|
|
73
70
|
```markdown
|
|
74
71
|
<a type="repo/existing-file-content">
|
|
75
72
|
|
|
76
|
-
The **hello.txt** file in the [bar folder](foo/bar) contains
|
|
73
|
+
The **hello.txt** file in the [bar folder](foo/bar) contains:
|
|
77
74
|
|
|
78
75
|
`hello world!`
|
|
79
76
|
|
|
@@ -93,7 +90,7 @@ documentation for this codebase might look like this:
|
|
|
93
90
|
<a type="extension/runnable-region">
|
|
94
91
|
|
|
95
92
|
```html
|
|
96
|
-
Run the <b type="repo/executable">scripts/setup</b>
|
|
93
|
+
Run the <b type="repo/executable">scripts/setup</b> script to set up your
|
|
97
94
|
environment.
|
|
98
95
|
```
|
|
99
96
|
|
package/dist/executable.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as color from "colorette";
|
|
|
2
2
|
import * as fs from "fs";
|
|
3
3
|
import { promises as fsp } from "fs";
|
|
4
4
|
import * as path from "path";
|
|
5
|
-
import * as textRunner from "text-runner-
|
|
5
|
+
import * as textRunner from "text-runner-engine";
|
|
6
6
|
export async function executable(action) {
|
|
7
7
|
const fileName = action.region.text();
|
|
8
8
|
const filePath = path.join(action.location.file.directory().platformified(), fileName);
|
|
@@ -3,7 +3,7 @@ import * as color from "colorette";
|
|
|
3
3
|
import eol from "eol";
|
|
4
4
|
import { promises as fs } from "fs";
|
|
5
5
|
import * as path from "path";
|
|
6
|
-
import * as textRunner from "text-runner-
|
|
6
|
+
import * as textRunner from "text-runner-engine";
|
|
7
7
|
export async function existingFileContent(action) {
|
|
8
8
|
const fileName = action.region.textInNodeOfType("em_open", "strong_open");
|
|
9
9
|
let relativeBaseDir = ".";
|
package/dist/existing-file.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as color from "colorette";
|
|
2
2
|
import { promises as fs } from "fs";
|
|
3
|
-
import * as textRunner from "text-runner-
|
|
3
|
+
import * as textRunner from "text-runner-engine";
|
|
4
4
|
export async function existingFile(action) {
|
|
5
5
|
const fileName = action.region.text();
|
|
6
6
|
action.name(`document mentions source code file ${color.cyan(fileName)}`);
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { executable } from "./executable.js";
|
|
2
|
-
import { existingFile } from "./existing-file.js";
|
|
3
2
|
import { existingFileContent } from "./existing-file-content.js";
|
|
3
|
+
import { existingFile } from "./existing-file.js";
|
|
4
4
|
export const textrunActions = {
|
|
5
5
|
executable,
|
|
6
6
|
existingFile,
|
|
7
|
-
existingFileContent
|
|
7
|
+
existingFileContent
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "textrun-repo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Text-Runner actions for verifying the content of the current repository",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
@@ -10,25 +10,25 @@
|
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "tsc -p tsconfig-build.json",
|
|
13
|
-
"clean": "rm -rf dist",
|
|
14
13
|
"cuke": "cucumber-js --format=progress",
|
|
15
|
-
"doc": "text-
|
|
16
|
-
"fix": "eslint --fix --ignore-pattern=dist/ . &&
|
|
17
|
-
"lint": "
|
|
14
|
+
"doc": "text-runner",
|
|
15
|
+
"fix": "eslint --fix --ignore-pattern=dist/ . && dprint fmt && sort-package-json --quiet",
|
|
16
|
+
"lint": "dprint check && sort-package-json --check --quiet && eslint --ignore-pattern=dist/ . && depcheck --config=../.depcheckrc",
|
|
17
|
+
"reset": "rm -rf dist && yarn run build"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"assert-no-diff": "
|
|
20
|
+
"assert-no-diff": "4.1.0",
|
|
21
21
|
"colorette": "2.0.20",
|
|
22
22
|
"eol": "0.10.0",
|
|
23
|
-
"text-runner-
|
|
23
|
+
"text-runner-engine": "7.1.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"shared-cucumber-steps": "*",
|
|
27
|
-
"text-runner": "
|
|
28
|
-
"textrun-action": "0.
|
|
29
|
-
"textrun-extension": "0.
|
|
30
|
-
"textrun-npm": "0.
|
|
27
|
+
"text-runner": "7.1.2",
|
|
28
|
+
"textrun-action": "0.3.1",
|
|
29
|
+
"textrun-extension": "0.3.1",
|
|
30
|
+
"textrun-npm": "0.3.1",
|
|
31
31
|
"tsx": "4.19.3"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "8aa3f5d9fbf24776eae6516b96ebde4863ad33a2"
|
|
34
34
|
}
|