embedex 0.3.1 → 0.3.2
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 +54 -54
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Embed shared text and code snippets from source files into destination files. Fo
|
|
|
11
11
|
|
|
12
12
|
- [Install](#install)
|
|
13
13
|
- [Usage](#usage)
|
|
14
|
-
- [
|
|
14
|
+
- [CLI reference](#cli-reference)
|
|
15
15
|
- [Local development commands](#local-development-commands)
|
|
16
16
|
|
|
17
17
|
## Install
|
|
@@ -41,76 +41,76 @@ npm install --global embedex
|
|
|
41
41
|
|
|
42
42
|
2. In the destination file, add an `<embedex source="..."></embedex>` tag that includes the source file's path.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
- `./README.md`:
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
```
|
|
47
|
+
# greeter
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Greets a person by name.
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
<embedex source="examples/greeter.ts">
|
|
52
|
+
</embedex>
|
|
53
|
+
```
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
- `./src/greeter.ts`:
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
```ts
|
|
58
|
+
/**
|
|
59
|
+
* Greets a person by name.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* <embedex source="examples/greeter.ts">
|
|
63
|
+
* </embedex>
|
|
64
|
+
*/
|
|
65
|
+
function greet(name: string) {
|
|
66
|
+
console.log(`Hello, ${name}!`);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
69
|
|
|
70
70
|
3. Run `npx embedex`.
|
|
71
|
-
4. The source is embedded!
|
|
71
|
+
4. The source is embedded!
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
- `./README.md`:
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
````
|
|
76
|
+
# greeter
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
Greets a person by name.
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
<embedex source="examples/greeter.ts">
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
```ts
|
|
83
|
+
import { greet } from "@my-scope/greeter";
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
greet("world");
|
|
86
|
+
```
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
</embedex>
|
|
89
|
+
````
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
- `./src/greeter.ts`:
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
93
|
+
````ts
|
|
94
|
+
/**
|
|
95
|
+
* Greets a person by name.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* <embedex source="examples/greeter.ts">
|
|
99
|
+
*
|
|
100
|
+
* ```ts
|
|
101
|
+
* import { greet } from "@my-scope/greeter";
|
|
102
|
+
*
|
|
103
|
+
* greet("world");
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* </embedex>
|
|
107
|
+
*/
|
|
108
|
+
function greet(name: string) {
|
|
109
|
+
console.log(`Hello, ${name}!`);
|
|
110
|
+
}
|
|
111
|
+
````
|
|
112
112
|
|
|
113
|
-
##
|
|
113
|
+
## CLI reference
|
|
114
114
|
|
|
115
115
|
```
|
|
116
116
|
Usage: embedex [options]
|