@akqa-denmark/shopify-theme-build 0.1.0

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/cli.js ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/cli/index.ts
4
+ var [, , command, ...args] = process.argv;
5
+ async function main() {
6
+ switch (command) {
7
+ case "prepare": {
8
+ const { runPrepare } = await import("./prepare-APTEPBMX.js");
9
+ await runPrepare(args);
10
+ break;
11
+ }
12
+ case "manifest": {
13
+ const { runManifest } = await import("./manifest-L2MJQDVK.js");
14
+ await runManifest();
15
+ break;
16
+ }
17
+ default:
18
+ console.error(`Unknown command: ${command}`);
19
+ console.error("Available commands: prepare, manifest");
20
+ process.exit(1);
21
+ }
22
+ }
23
+ main().catch((err) => {
24
+ console.error(err.message || err);
25
+ process.exit(1);
26
+ });
@@ -0,0 +1,58 @@
1
+ interface StoreDefinition {
2
+ slug: string;
3
+ name: string;
4
+ foundation?: boolean;
5
+ }
6
+ interface BuildConfig {
7
+ stores: StoreDefinition[];
8
+ defaultStore: string;
9
+ storesDirectory?: string;
10
+ sharedDirectory?: string;
11
+ build?: {
12
+ parallel?: boolean;
13
+ };
14
+ vite?: {
15
+ port?: number;
16
+ bundledDev?: boolean;
17
+ };
18
+ }
19
+ interface ResolvedConfig {
20
+ stores: StoreDefinition[];
21
+ defaultStore: string;
22
+ storesDirectory: string;
23
+ sharedDirectory: string;
24
+ rootDir: string;
25
+ build: {
26
+ parallel: boolean;
27
+ };
28
+ vite: {
29
+ port: number;
30
+ bundledDev: boolean;
31
+ };
32
+ }
33
+ declare function defineConfig(config: BuildConfig): BuildConfig;
34
+
35
+ declare function resolveConfig(cwd?: string): Promise<ResolvedConfig>;
36
+ /**
37
+ * Priority: explicit arg > CURRENT_STORE env > defaultStore from config
38
+ */
39
+ declare function resolveStore(config: ResolvedConfig, explicit?: string): string;
40
+ declare function getStorePaths(config: ResolvedConfig, store: string): {
41
+ storeDir: string;
42
+ themeDir: string;
43
+ srcDir: string;
44
+ schemasDir: string;
45
+ entrypointsDir: string;
46
+ localesDir: string;
47
+ configDir: string;
48
+ };
49
+
50
+ interface OrchestrateOptions {
51
+ store?: string;
52
+ config: ResolvedConfig;
53
+ skipSchemas?: boolean;
54
+ skipLocales?: boolean;
55
+ }
56
+ declare function orchestrate(options: OrchestrateOptions): Promise<void>;
57
+
58
+ export { type BuildConfig, type ResolvedConfig, type StoreDefinition, defineConfig, getStorePaths, orchestrate, resolveConfig, resolveStore };
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ import {
2
+ getStorePaths,
3
+ orchestrate,
4
+ resolveConfig,
5
+ resolveStore
6
+ } from "./chunk-JXQLZXJ2.js";
7
+
8
+ // src/config/types.ts
9
+ function defineConfig(config) {
10
+ return config;
11
+ }
12
+ export {
13
+ defineConfig,
14
+ getStorePaths,
15
+ orchestrate,
16
+ resolveConfig,
17
+ resolveStore
18
+ };
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ resolveConfig
4
+ } from "./chunk-IHCJ6PUT.js";
5
+
6
+ // src/cli/manifest.ts
7
+ async function runManifest() {
8
+ const config = await resolveConfig();
9
+ const manifest = {
10
+ stores: config.stores.map((s) => ({
11
+ slug: s.slug,
12
+ name: s.name,
13
+ deployable: !s.foundation
14
+ }))
15
+ };
16
+ process.stdout.write(JSON.stringify(manifest, null, 2) + "\n");
17
+ }
18
+ export {
19
+ runManifest
20
+ };