shopify-accelerate-app 1.3.1 → 1.3.2
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
package/src/esbuild/esbuild.ts
CHANGED
|
@@ -195,16 +195,15 @@ const runBlockJsEsbuild = async (entryFile, block: ShopifyAppBlock & { path: str
|
|
|
195
195
|
|
|
196
196
|
if (process.env.SHOPIFY_ACCELERATE_TAILWIND_PREFIX) {
|
|
197
197
|
clearTimeout(current.timeout);
|
|
198
|
-
|
|
198
|
+
const cssPath = path.join(config.extension_path, `assets/tailwind.css`);
|
|
199
|
+
const runFinalPass = () => {
|
|
200
|
+
if (!fs.existsSync(cssPath)) {
|
|
201
|
+
current.timeout = setTimeout(runFinalPass, 300);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
199
204
|
Object.values(config.sources.blockSchemas ?? {})?.forEach(({ folder }) => {
|
|
200
205
|
if (!content.includes("/* CSS CROSS CHECKED */")) {
|
|
201
|
-
const finalContent = transformContent(
|
|
202
|
-
content,
|
|
203
|
-
true,
|
|
204
|
-
fs.readFileSync(path.join(config.extension_path, `assets/tailwind.css`), {
|
|
205
|
-
encoding: "utf-8",
|
|
206
|
-
})
|
|
207
|
-
);
|
|
206
|
+
const finalContent = transformContent(content, true, fs.readFileSync(cssPath, { encoding: "utf-8" }));
|
|
208
207
|
console.log(Object.fromEntries(notCSSClasses.entries()));
|
|
209
208
|
fs.writeFileSync(finalPath, `${finalContent}\n\n/* CSS CROSS CHECKED */`);
|
|
210
209
|
if (process.env.SHOPIFY_ACCELERATE_THEME_OUTPUT_PATH) {
|
|
@@ -212,7 +211,8 @@ const runBlockJsEsbuild = async (entryFile, block: ShopifyAppBlock & { path: str
|
|
|
212
211
|
}
|
|
213
212
|
}
|
|
214
213
|
});
|
|
215
|
-
}
|
|
214
|
+
};
|
|
215
|
+
current.timeout = setTimeout(runFinalPass, 1800);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
try {
|
|
@@ -393,13 +393,14 @@ export const generateLiquidFiles = (final?: boolean, cssOutput?: string) => {
|
|
|
393
393
|
|
|
394
394
|
clearTimeout(current.timeout);
|
|
395
395
|
if (!final) {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
);
|
|
403
|
-
}
|
|
396
|
+
const cssPath = path.join(config.extension_path, `assets/tailwind.css`);
|
|
397
|
+
const runFinalPass = () => {
|
|
398
|
+
if (!fs.existsSync(cssPath)) {
|
|
399
|
+
current.timeout = setTimeout(runFinalPass, 300);
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
generateLiquidFiles(true, fs.readFileSync(cssPath, { encoding: "utf-8" }));
|
|
403
|
+
};
|
|
404
|
+
current.timeout = setTimeout(runFinalPass, 1800);
|
|
404
405
|
}
|
|
405
406
|
};
|