vargai 0.4.0-alpha11 → 0.4.0-alpha12
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
CHANGED
|
@@ -85,6 +85,11 @@ export const renderCmd = defineCommand({
|
|
|
85
85
|
description: "skip all generation, use placeholders only",
|
|
86
86
|
default: false,
|
|
87
87
|
},
|
|
88
|
+
"no-cache": {
|
|
89
|
+
type: "boolean",
|
|
90
|
+
description: "disable cache (don't read or write)",
|
|
91
|
+
default: false,
|
|
92
|
+
},
|
|
88
93
|
},
|
|
89
94
|
async run({ args }) {
|
|
90
95
|
const file = args.file as string;
|
|
@@ -123,9 +128,11 @@ export const renderCmd = defineCommand({
|
|
|
123
128
|
console.log(`rendering ${file} → ${outputPath}${modeLabel}`);
|
|
124
129
|
}
|
|
125
130
|
|
|
131
|
+
const useCache = !args["no-cache"] && mode !== "preview";
|
|
132
|
+
|
|
126
133
|
const buffer = await render(component, {
|
|
127
134
|
output: outputPath,
|
|
128
|
-
cache: args.cache,
|
|
135
|
+
cache: useCache ? args.cache : undefined,
|
|
129
136
|
mode,
|
|
130
137
|
});
|
|
131
138
|
|