@sealcode/sealgen 0.14.1 → 0.14.4
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/.nvmrc +1 -0
- package/dist/find-css-includes.js +2 -2
- package/dist/generate-components.js +1 -3
- package/package.json +1 -1
- package/src/find-css-includes.ts +17 -15
- package/src/generate-components.ts +3 -3
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20
|
|
@@ -4,13 +4,13 @@ import { relative } from "path";
|
|
|
4
4
|
import { walkDir } from "./utils/walk.js";
|
|
5
5
|
const target_locreq = _locreq(process.cwd());
|
|
6
6
|
async function generate_css_includes() {
|
|
7
|
-
const files = await Promise.all(
|
|
7
|
+
const files = (await Promise.all(
|
|
8
8
|
(await walkDir(target_locreq.resolve("src/"))).filter(
|
|
9
9
|
(f) => f.endsWith(".css") && !f.endsWith("/main.css") && !f.endsWith("\\main.css") && !f.endsWith("/includes.css") && !f.endsWith("\\includes.css") && !f.includes(".#")
|
|
10
10
|
).map(
|
|
11
11
|
(fullpath) => relative(target_locreq.resolve("src/"), fullpath)
|
|
12
12
|
)
|
|
13
|
-
);
|
|
13
|
+
)).sort();
|
|
14
14
|
await fs.writeFile(
|
|
15
15
|
target_locreq.resolve("src/includes.css"),
|
|
16
16
|
`/* DO NOT EDIT! This file is generated automaticaly with npx sealgen generate-css-includes */
|
|
@@ -10,9 +10,7 @@ const target_locreq = _locreq(process.cwd());
|
|
|
10
10
|
async function generateComponents() {
|
|
11
11
|
const components_dir = target_locreq.resolve("src/back/jdd-components");
|
|
12
12
|
await mkdir(components_dir, { recursive: true });
|
|
13
|
-
const component_names = (await recursive(components_dir)).filter(
|
|
14
|
-
(c) => c.endsWith(".jdd.tsx")
|
|
15
|
-
);
|
|
13
|
+
const component_names = (await recursive(components_dir)).filter((c) => c.endsWith(".jdd.tsx")).sort();
|
|
16
14
|
const component_data = component_names.map(
|
|
17
15
|
(p) => "./" + path.relative(components_dir, p).replace(/\.[tj]sx?$/, ".js")
|
|
18
16
|
).map((relative_path) => {
|
package/package.json
CHANGED
package/src/find-css-includes.ts
CHANGED
|
@@ -6,21 +6,23 @@ import { walkDir } from "./utils/walk.js";
|
|
|
6
6
|
const target_locreq = _locreq(process.cwd());
|
|
7
7
|
|
|
8
8
|
export async function generate_css_includes(): Promise<void> {
|
|
9
|
-
const files =
|
|
10
|
-
|
|
11
|
-
.
|
|
12
|
-
(
|
|
13
|
-
f
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
const files = (
|
|
10
|
+
await Promise.all(
|
|
11
|
+
(await walkDir(target_locreq.resolve("src/")))
|
|
12
|
+
.filter(
|
|
13
|
+
(f) =>
|
|
14
|
+
f.endsWith(".css") &&
|
|
15
|
+
!f.endsWith("/main.css") &&
|
|
16
|
+
!f.endsWith("\\main.css") &&
|
|
17
|
+
!f.endsWith("/includes.css") &&
|
|
18
|
+
!f.endsWith("\\includes.css") &&
|
|
19
|
+
!f.includes(".#")
|
|
20
|
+
)
|
|
21
|
+
.map((fullpath) =>
|
|
22
|
+
relative(target_locreq.resolve("src/"), fullpath)
|
|
23
|
+
)
|
|
24
|
+
)
|
|
25
|
+
).sort();
|
|
24
26
|
|
|
25
27
|
await fs.writeFile(
|
|
26
28
|
target_locreq.resolve("src/includes.css"),
|
|
@@ -13,9 +13,9 @@ const target_locreq = _locreq(process.cwd());
|
|
|
13
13
|
export async function generateComponents(): Promise<void> {
|
|
14
14
|
const components_dir = target_locreq.resolve("src/back/jdd-components");
|
|
15
15
|
await mkdir(components_dir, { recursive: true });
|
|
16
|
-
const component_names = (await recursive(components_dir))
|
|
17
|
-
c.endsWith(".jdd.tsx")
|
|
18
|
-
|
|
16
|
+
const component_names = (await recursive(components_dir))
|
|
17
|
+
.filter((c) => c.endsWith(".jdd.tsx"))
|
|
18
|
+
.sort();
|
|
19
19
|
const component_data = component_names
|
|
20
20
|
.map(
|
|
21
21
|
(p) =>
|