@sealcode/sealgen 0.8.50 → 0.8.52
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/lib/build.js +1 -1
- package/lib/find-scss-includes.js +2 -1
- package/lib/generate-collections.js +1 -0
- package/lib/utils/walk.js +3 -0
- package/package.json +1 -1
- package/src/build.ts +3 -1
- package/src/find-scss-includes.ts +2 -1
- package/src/generate-collections.ts +1 -0
- package/src/utils/walk.ts +4 -0
package/lib/build.js
CHANGED
|
@@ -33,7 +33,7 @@ const generate_collections_1 = require("./generate-collections");
|
|
|
33
33
|
const generate_routes_1 = require("./generate-routes");
|
|
34
34
|
async function build_ts() {
|
|
35
35
|
await Promise.all([generate_collections_1.generateCollections(), generate_routes_1.generateRoutes()]);
|
|
36
|
-
const entryPoints = await tiny_glob_1.default("./src/back/**/*.ts");
|
|
36
|
+
const entryPoints = (await tiny_glob_1.default("./src/back/**/*.ts")).filter((path) => !path.includes(".#"));
|
|
37
37
|
try {
|
|
38
38
|
await esbuild_1.build({
|
|
39
39
|
entryPoints,
|
|
@@ -13,7 +13,8 @@ async function generateScssIncludes() {
|
|
|
13
13
|
const files = await Promise.all((await walk_1.walkDir(target_locreq.resolve("src/")))
|
|
14
14
|
.filter((f) => f.endsWith(".scss") &&
|
|
15
15
|
!f.endsWith("/main.scss") &&
|
|
16
|
-
!f.endsWith("/includes.scss")
|
|
16
|
+
!f.endsWith("/includes.scss") &&
|
|
17
|
+
!f.includes(".#"))
|
|
17
18
|
.map((fullpath) => path_1.relative(target_locreq.resolve("src/"), fullpath)));
|
|
18
19
|
await fs_1.promises.writeFile(target_locreq.resolve("src/includes.scss"), `// DO NOT EDIT! This file is generated automaticaly with npx sealgen generate-scss-includes
|
|
19
20
|
|
|
@@ -41,6 +41,7 @@ async function generateCollections() {
|
|
|
41
41
|
const collections_dir = target_locreq.resolve("src/back/collections");
|
|
42
42
|
const files = (await fs_1.promises.readdir(collections_dir)).filter((f) => !/\.(sub)?test\./.exec(f) &&
|
|
43
43
|
f != "collections.ts" &&
|
|
44
|
+
!f.includes(".#") &&
|
|
44
45
|
f.endsWith(".ts"));
|
|
45
46
|
const file_data = await Promise.all(files.map(async (file) => {
|
|
46
47
|
const full_path = target_locreq.resolve("src/back/collections/" + file);
|
package/lib/utils/walk.js
CHANGED
|
@@ -7,6 +7,9 @@ async function walkDir(dir) {
|
|
|
7
7
|
const entries = await fs_1.promises.readdir(dir);
|
|
8
8
|
let ret = [];
|
|
9
9
|
for (const entry of entries) {
|
|
10
|
+
if (entry.includes(".#")) {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
10
13
|
const fullpath = path_1.resolve(dir, entry);
|
|
11
14
|
// eslint-disable-next-line no-await-in-loop
|
|
12
15
|
const info = await fs_1.promises.stat(fullpath);
|
package/package.json
CHANGED
package/src/build.ts
CHANGED
|
@@ -9,7 +9,9 @@ import { generateRoutes } from "./generate-routes";
|
|
|
9
9
|
|
|
10
10
|
async function build_ts() {
|
|
11
11
|
await Promise.all([generateCollections(), generateRoutes()]);
|
|
12
|
-
const entryPoints = await glob("./src/back/**/*.ts")
|
|
12
|
+
const entryPoints = (await glob("./src/back/**/*.ts")).filter(
|
|
13
|
+
(path) => !path.includes(".#")
|
|
14
|
+
);
|
|
13
15
|
try {
|
|
14
16
|
await build({
|
|
15
17
|
entryPoints,
|
|
@@ -12,7 +12,8 @@ export async function generateScssIncludes(): Promise<void> {
|
|
|
12
12
|
(f) =>
|
|
13
13
|
f.endsWith(".scss") &&
|
|
14
14
|
!f.endsWith("/main.scss") &&
|
|
15
|
-
!f.endsWith("/includes.scss")
|
|
15
|
+
!f.endsWith("/includes.scss") &&
|
|
16
|
+
!f.includes(".#")
|
|
16
17
|
)
|
|
17
18
|
.map((fullpath) =>
|
|
18
19
|
relative(target_locreq.resolve("src/"), fullpath)
|
package/src/utils/walk.ts
CHANGED
|
@@ -5,7 +5,11 @@ export async function walkDir(dir: string): Promise<string[]> {
|
|
|
5
5
|
const entries = await fs.readdir(dir);
|
|
6
6
|
let ret: string[] = [];
|
|
7
7
|
for (const entry of entries) {
|
|
8
|
+
if (entry.includes(".#")) {
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
8
11
|
const fullpath = resolve(dir, entry);
|
|
12
|
+
|
|
9
13
|
// eslint-disable-next-line no-await-in-loop
|
|
10
14
|
const info = await fs.stat(fullpath);
|
|
11
15
|
|