shopify-accelerate-app 1.0.39 → 1.0.40

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify-accelerate-app",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "Shopify App development with full Typescript Support",
5
5
  "author": "Felix Tellmann",
6
6
  "license": "MIT",
@@ -196,13 +196,16 @@ const runBlockJsEsbuild = async (entryFile, block: ShopifyAppBlock & { path: str
196
196
  current.timeout = setTimeout(() => {
197
197
  Object.values(config.sources.blockSchemas ?? {})?.forEach(({ folder }) => {
198
198
  if (!content.includes("/* CSS CROSS CHECKED */")) {
199
- const finalContent = transformContent(
200
- content,
201
- true,
202
- fs.readFileSync(path.join(config.extension_path, `assets/tailwind.css`), {
203
- encoding: "utf-8",
204
- })
205
- );
199
+ const finalContent = process.env.SHOPIFY_ACCELERATE_TAILWIND_PREFIX
200
+ ? transformContent(
201
+ content,
202
+ true,
203
+ fs.readFileSync(path.join(config.extension_path, `assets/tailwind.css`), {
204
+ encoding: "utf-8",
205
+ })
206
+ )
207
+ : content;
208
+
206
209
  console.log(Object.fromEntries(notCSSClasses.entries()));
207
210
  fs.writeFileSync(finalPath, `${finalContent}\n\n/* CSS CROSS CHECKED */`);
208
211
  if (process.env.SHOPIFY_ACCELERATE_THEME_OUTPUT_PATH) {
@@ -13,6 +13,9 @@ const current = { timeout: null };
13
13
  const transformContent = (input: string, final = false, cssOutput = "") => {
14
14
  const classRegex = /class=(["'])([^"']+)\1/g;
15
15
 
16
+ if (!process.env.SHOPIFY_ACCELERATE_TAILWIND_PREFIX) {
17
+ return input;
18
+ }
16
19
  return input.replace(classRegex, (match, p1, p2, p3) => {
17
20
  return `class=${p1}${transformClassNameStrings(p2, final, cssOutput)}${p1}`;
18
21
  });
@@ -2,10 +2,8 @@
2
2
  import child_process from "child_process";
3
3
  import fs from "fs";
4
4
  import path from "path";
5
- import { delay } from "../utils/delay";
6
- import { transformContent } from "../esbuild/esbuild";
7
5
  import { config, root_dir } from "../../shopify-accelerate-app";
8
- import { deleteFile, writeCompareFile } from "../utils/fs";
6
+ import { writeCompareFile } from "../utils/fs";
9
7
 
10
8
  const watch = require("node-watch");
11
9