@community-release/nx-ui 0.0.16 → 0.0.17
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/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addTemplate, addPlugin, addComponentsDir, addComponent } from '@nuxt/kit';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
3
4
|
|
|
4
5
|
const defaultStyle = {
|
|
5
6
|
"content-width": "1400px",
|
|
@@ -122,7 +123,7 @@ const readComponentsProps = (resolve, srcDir, options = {}) => {
|
|
|
122
123
|
let files = fs.readdirSync(dirComponents, { recursive: true });
|
|
123
124
|
files = files.filter((v) => v.indexOf("props.json") !== -1);
|
|
124
125
|
for (let file of files) {
|
|
125
|
-
const componentName = file.split(
|
|
126
|
+
const componentName = file.split(path.sep)[0];
|
|
126
127
|
const propsJSON = fs.readFileSync(resolve(dirComponents, file), { encoding: "utf-8" });
|
|
127
128
|
const props = JSON.parse(propsJSON);
|
|
128
129
|
result[componentName] = props;
|