@timvir/mdx 0.2.38 → 0.2.41
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/CHANGELOG.md +8 -0
- package/index.js +4 -4
- package/knip.config.d.ts +5 -0
- package/knip.config.ts +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -40,7 +40,7 @@ export function remarkPlugin() {
|
|
|
40
40
|
if (fs.existsSync(module)) {
|
|
41
41
|
return fs.readFileSync(module, "utf8");
|
|
42
42
|
} else {
|
|
43
|
-
return fs.readFileSync(module
|
|
43
|
+
return fs.readFileSync(`${module}.tsx`, "utf8");
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -50,7 +50,7 @@ export function remarkPlugin() {
|
|
|
50
50
|
* Genrate a unique name that will be used to hold the reference
|
|
51
51
|
* to the sample component.
|
|
52
52
|
*/
|
|
53
|
-
const name = `C${genName(filename, component, variant,
|
|
53
|
+
const name = `C${genName(filename, component, variant, `${counter}`)}`;
|
|
54
54
|
counter = counter + 1;
|
|
55
55
|
|
|
56
56
|
/*
|
|
@@ -117,7 +117,7 @@ export function remarkPlugin() {
|
|
|
117
117
|
node[k] = v;
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
-
|
|
120
|
+
"source/component": () => {
|
|
121
121
|
const source = (() => {
|
|
122
122
|
const file = parse(loadSource(), {
|
|
123
123
|
sourceType: "module",
|
|
@@ -149,7 +149,7 @@ export function remarkPlugin() {
|
|
|
149
149
|
node[k] = v;
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
|
-
|
|
152
|
+
"source/markup": () => {
|
|
153
153
|
const source = (() => {
|
|
154
154
|
const file = parse(loadSource(), {
|
|
155
155
|
sourceType: "module",
|
package/knip.config.d.ts
ADDED
package/knip.config.ts
ADDED