@akqa-denmark/shopify-theme-build 0.1.0 → 0.1.1
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/dist/{chunk-JXQLZXJ2.js → chunk-24TXHEID.js} +17 -16
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -3
- package/dist/vite.js +1 -1
- package/package.json +1 -1
|
@@ -97,6 +97,22 @@ var ASSET_NAMING = {
|
|
|
97
97
|
entry: "[name]-[hash].js"
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
+
// src/utils/strings.ts
|
|
101
|
+
function capitalizeFirstLetter(string) {
|
|
102
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
103
|
+
}
|
|
104
|
+
function snakifyString(inputString) {
|
|
105
|
+
return inputString ? inputString.replace(/["\\/]/g, "").replace(/[\s-]+/g, "_").toLowerCase() : "";
|
|
106
|
+
}
|
|
107
|
+
function formatToName(fileName, type) {
|
|
108
|
+
const pascalCase = fileName.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
109
|
+
if (type === "section-blocks") {
|
|
110
|
+
return `${pascalCase}Block`;
|
|
111
|
+
}
|
|
112
|
+
const suffix = capitalizeFirstLetter(type).slice(0, -1);
|
|
113
|
+
return `${pascalCase}${suffix}`;
|
|
114
|
+
}
|
|
115
|
+
|
|
100
116
|
// src/core/orchestrator.ts
|
|
101
117
|
import { globSync as globSync2 } from "fs";
|
|
102
118
|
import { resolve as resolve4, basename, parse as pathParse } from "path";
|
|
@@ -605,22 +621,6 @@ ${JSON.stringify(output, null, 2)}
|
|
|
605
621
|
}
|
|
606
622
|
}
|
|
607
623
|
|
|
608
|
-
// src/utils/strings.ts
|
|
609
|
-
function capitalizeFirstLetter(string) {
|
|
610
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
611
|
-
}
|
|
612
|
-
function snakifyString(inputString) {
|
|
613
|
-
return inputString ? inputString.replace(/["\\/]/g, "").replace(/[\s-]+/g, "_").toLowerCase() : "";
|
|
614
|
-
}
|
|
615
|
-
function formatToName(fileName, type) {
|
|
616
|
-
const pascalCase = fileName.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
617
|
-
if (type === "section-blocks") {
|
|
618
|
-
return `${pascalCase}Block`;
|
|
619
|
-
}
|
|
620
|
-
const suffix = capitalizeFirstLetter(type).slice(0, -1);
|
|
621
|
-
return `${pascalCase}${suffix}`;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
624
|
// src/core/locale-extractor.ts
|
|
625
625
|
function simplifyObject(obj) {
|
|
626
626
|
if (!obj || typeof obj !== "object") return void 0;
|
|
@@ -764,5 +764,6 @@ export {
|
|
|
764
764
|
getStorePaths,
|
|
765
765
|
ASSET_NAMING,
|
|
766
766
|
log,
|
|
767
|
+
snakifyString,
|
|
767
768
|
orchestrate
|
|
768
769
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -55,4 +55,6 @@ interface OrchestrateOptions {
|
|
|
55
55
|
}
|
|
56
56
|
declare function orchestrate(options: OrchestrateOptions): Promise<void>;
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
declare function snakifyString(inputString: string): string;
|
|
59
|
+
|
|
60
|
+
export { type BuildConfig, type ResolvedConfig, type StoreDefinition, defineConfig, getStorePaths, orchestrate, resolveConfig, resolveStore, snakifyString };
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
getStorePaths,
|
|
3
3
|
orchestrate,
|
|
4
4
|
resolveConfig,
|
|
5
|
-
resolveStore
|
|
6
|
-
|
|
5
|
+
resolveStore,
|
|
6
|
+
snakifyString
|
|
7
|
+
} from "./chunk-24TXHEID.js";
|
|
7
8
|
|
|
8
9
|
// src/config/types.ts
|
|
9
10
|
function defineConfig(config) {
|
|
@@ -14,5 +15,6 @@ export {
|
|
|
14
15
|
getStorePaths,
|
|
15
16
|
orchestrate,
|
|
16
17
|
resolveConfig,
|
|
17
|
-
resolveStore
|
|
18
|
+
resolveStore,
|
|
19
|
+
snakifyString
|
|
18
20
|
};
|
package/dist/vite.js
CHANGED