milkio 0.2.6 → 0.2.7
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/package.json +1 -1
- package/scripts/gen-significant.ts +8 -2
- package/types.ts +1 -0
package/package.json
CHANGED
|
@@ -18,6 +18,14 @@ export default async () => {
|
|
|
18
18
|
existsSync(join("generated", "raw")) || mkdirSync(join("generated", "raw"));
|
|
19
19
|
existsSync(join("generated", "raw", "apps")) || mkdirSync(join("generated", "raw", "apps"));
|
|
20
20
|
|
|
21
|
+
if (!existsSync(join(cwd(), "milkio.toml"))) return;
|
|
22
|
+
const milkioConfig = (await import(join(cwd(), "milkio.toml"))).default as MilkioConfig;
|
|
23
|
+
|
|
24
|
+
for (const key in milkioConfig.exists) {
|
|
25
|
+
const file = milkioConfig.exists[key];
|
|
26
|
+
if (!existsSync(join(file.path))) await writeFile(join(file.path), file.content ?? "");
|
|
27
|
+
}
|
|
28
|
+
|
|
21
29
|
if (!existsSync(join("generated", "README.md"))) {
|
|
22
30
|
await writeFile(join("generated", "README.md"), "⚠️ All files in this directory are generated by milkio. Please do not modify the content, otherwise your modifications will be overwritten in the next generation.");
|
|
23
31
|
}
|
|
@@ -161,8 +169,6 @@ export default {
|
|
|
161
169
|
console.timeEnd(`Typia Stage`);
|
|
162
170
|
console.log(``);
|
|
163
171
|
|
|
164
|
-
if (!existsSync(join(cwd(), "milkio.toml"))) return;
|
|
165
|
-
const milkioConfig = (await import(join(cwd(), "milkio.toml"))).default as MilkioConfig;
|
|
166
172
|
if (!milkioConfig?.generate?.significant) return;
|
|
167
173
|
let i = 0;
|
|
168
174
|
for (const command of milkioConfig.generate.significant) {
|
package/types.ts
CHANGED