@thorprovider/create-storefront 0.1.1 → 0.1.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
@@ -1,11 +1,9 @@
1
1
  {
2
2
  "name": "@thorprovider/create-storefront",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Installable OpenCode command suite that scaffolds Thor Commerce json-render storefronts (Next.js, @thorprovider/blocks, @thorprovider/adapters, Medusa)",
5
5
  "type": "module",
6
- "bin": {
7
- "create-storefront": "./bin/install.js"
8
- },
6
+ "bin": "./bin/install.js",
9
7
  "files": [
10
8
  "bin",
11
9
  "commands",
@@ -18,7 +16,8 @@
18
16
  "node": ">=18.17.0"
19
17
  },
20
18
  "scripts": {
21
- "install:opencode": "node ./bin/install.js"
19
+ "install:opencode": "node ./bin/install.js",
20
+ "test": "vitest run --config vitest.config.ts"
22
21
  },
23
22
  "publishConfig": {
24
23
  "access": "public",
@@ -36,5 +35,8 @@
36
35
  "json-render",
37
36
  "scaffolding"
38
37
  ],
38
+ "devDependencies": {
39
+ "vitest": "^3.2.4"
40
+ },
39
41
  "license": "MIT"
40
- }
42
+ }
@@ -32,16 +32,16 @@ export const __STOREFRONT_CAMEL__Spec: NextAppSpec = {
32
32
  state: {},
33
33
  layouts: {
34
34
  default: {
35
- layout: {
36
- root: 'layout',
37
- elements: {
38
- layout: {
39
- type: 'Layout',
40
- props: {},
41
- slots: { header: [], footer: [] },
42
- children: [],
43
- },
35
+ root: 'layout',
36
+ elements: {
37
+ layout: {
38
+ type: 'Layout',
39
+ props: {},
40
+ children: ['slot'],
44
41
  },
42
+ // The page content is injected at the Slot element by @json-render/next.
43
+ // Without it the rendered layout drops the page and the store looks empty.
44
+ slot: { type: 'Slot', props: {}, children: [] },
45
45
  },
46
46
  },
47
47
  },