@@ -19,13 +19,13 @@ Before we begin, here's what your project structure will look like after complet
19
19
``` ascii
20
20
apps/
21
21
├── playwright/
22
+ ├── storefront-middleware/
22
23
├── storefront-unified-nextjs/
23
- ├── storefront-unified-middleware/
24
24
└── stores/
25
25
├── default/
26
26
│ └── playwright/
27
- │ └── storefront-unified-nextjs/
28
27
│ └── storefront-middleware/
28
+ │ └── storefront-unified-nextjs/
29
29
packages/
30
30
eslint-config/
31
31
lint-staged-config/
@@ -37,13 +37,13 @@ packages/
37
37
``` ascii
38
38
apps/
39
39
├── playwright/
40
+ ├── storefront-middleware/
40
41
├── storefront-unified-nuxt/
41
- ├── storefront-unified-middleware/
42
42
└── stores/
43
43
├── default/
44
44
│ └── playwright/
45
- │ └── storefront-unified-nuxt/
46
45
│ └── storefront-middleware/
46
+ │ └── storefront-unified-nuxt/
47
47
packages/
48
48
eslint-config/
49
49
lint-staged-config/
@@ -531,6 +531,12 @@ Create `packages/tailwind-config/tsconfig.json`:
531
531
}
532
532
```
533
533
534
+ Create ` packages/tailwind-config/src ` directory:
535
+
536
+ ``` bash
537
+ mkdir -p packages/tailwind-config/src
538
+ ```
539
+
534
540
:: tabs { :titles =' ["Next.js", "Nuxt"] ' }
535
541
536
542
#tab-1
@@ -701,7 +707,7 @@ Create `packages/tailwind-config/package.json`:
701
707
"types" : " ./dist/nuxt.d.cts"
702
708
},
703
709
"types" : " ./dist/nuxt.d.ts"
704
- },
710
+ }
705
711
},
706
712
"scripts" : {
707
713
"build" : " unbuild" ,
@@ -738,22 +744,22 @@ mv apps/storefront-unified-nextjs/.prettierrc apps/storefront-unified-nextjs/.pr
738
744
739
745
Then update the configuration files:
740
746
741
- Update ` apps/storefront-unified-nextjs/eslint.config.mjs ` :
747
+ Replace the content of ` apps/storefront-unified-nextjs/eslint.config.mjs ` with :
742
748
``` js
743
749
export { default } from ' eslint-config/nextjs' ;
744
750
```
745
751
746
- Update ` apps/storefront-unified-nextjs/.prettierrc.mjs ` :
752
+ Replace the content of ` apps/storefront-unified-nextjs/.prettierrc.mjs ` with :
747
753
``` js
748
754
export { default } from ' prettier-config/nextjs' ;
749
755
```
750
756
751
- Update ` apps/storefront-unified-nextjs/lint-staged.config.mjs ` :
757
+ Replace the content of ` apps/storefront-unified-nextjs/lint-staged.config.mjs ` with :
752
758
``` js
753
759
export { default } from ' lint-staged-config/nextjs' ;
754
760
```
755
761
756
- Update ` apps/storefront-unified-nextjs/tailwind.config.ts ` :
762
+ Replace the content of ` apps/storefront-unified-nextjs/tailwind.config.ts ` with :
757
763
``` ts
758
764
import tailwindConfig from ' tailwind-config/nextjs' ;
759
765
import type { Config } from ' tailwindcss' ;
@@ -781,22 +787,22 @@ mv apps/storefront-unified-nuxt/.prettierrc apps/storefront-unified-nuxt/.pretti
781
787
782
788
Then update the configuration files:
783
789
784
- Update ` apps/storefront-unified-nuxt/eslint.config.mjs ` :
790
+ Replace the content of ` apps/storefront-unified-nuxt/eslint.config.mjs ` with :
785
791
``` js
786
792
export { default } from ' eslint-config/nuxt' ;
787
793
```
788
794
789
- Update ` apps/storefront-unified-nuxt/.prettierrc.mjs ` :
795
+ Replace the content of ` apps/storefront-unified-nuxt/.prettierrc.mjs ` with :
790
796
``` js
791
797
export { default } from ' prettier-config/nuxt' ;
792
798
```
793
799
794
- Update ` apps/storefront-unified-nuxt/lint-staged.config.mjs ` :
800
+ Replace the content of ` apps/storefront-unified-nuxt/lint-staged.config.mjs ` with :
795
801
``` js
796
802
export { default } from ' lint-staged-config/nuxt' ;
797
803
```
798
804
799
- Update ` apps/storefront-unified-nuxt/tailwind.config.ts ` :
805
+ Replace the content of ` apps/storefront-unified-nuxt/tailwind.config.ts ` with :
800
806
``` ts
801
807
import tailwindConfig from ' tailwind-config/nuxt' ;
802
808
import type { Config } from ' tailwindcss' ;
@@ -813,32 +819,32 @@ export default {
813
819
```
814
820
::
815
821
816
- Update ` apps/playwright/eslint.config.mjs ` :
822
+ Replace the content of ` apps/playwright/eslint.config.mjs ` with :
817
823
``` js
818
824
export { default } from ' eslint-config/playwright' ;
819
825
```
820
826
821
- Update ` apps/playwright/.prettierrc.mjs ` :
827
+ Replace the content of ` apps/playwright/.prettierrc.mjs ` with :
822
828
``` js
823
829
export { default } from ' prettier-config/playwright' ;
824
830
```
825
831
826
- Update ` apps/playwright/lint-staged.config.mjs ` :
832
+ Replace the content of ` apps/playwright/lint-staged.config.mjs ` with :
827
833
``` js
828
834
export { default } from ' lint-staged-config/playwright' ;
829
835
```
830
836
831
- Update ` apps/storefront-middleware/eslint.config.mjs ` :
837
+ Replace the content of ` apps/storefront-middleware/eslint.config.mjs ` with :
832
838
``` js
833
839
export { default } from ' eslint-config/middleware' ;
834
840
```
835
841
836
- Update ` apps/storefront-middleware/.prettierrc.mjs ` :
842
+ Replace the content of ` apps/storefront-middleware/.prettierrc.mjs ` with :
837
843
``` js
838
844
export { default } from ' prettier-config/middleware' ;
839
845
```
840
846
841
- Update ` apps/storefront-middleware/lint-staged.config.mjs ` :
847
+ Replace the content of ` apps/storefront-middleware/lint-staged.config.mjs ` with :
842
848
``` js
843
849
export { default } from ' lint-staged-config/middleware' ;
844
850
```
@@ -926,6 +932,9 @@ If `yarn lint:fix` finds any issues that it cannot automatically fix, we recomme
926
932
"lint" : {
927
933
"dependsOn" : []
928
934
},
935
+ "lint:fix" : {
936
+ "dependsOn" : []
937
+ },
929
938
"format" : {
930
939
"outputs" : []
931
940
},
@@ -1096,13 +1105,16 @@ Update `apps/storefront-unified-nuxt/nuxt.config.ts`
1096
1105
}
1097
1106
```
1098
1107
1099
- Update ` apps/storefront-unified-nuxt/tsconfig.json `
1108
+ Update ` apps/storefront-unified-nuxt/nuxt.config.ts ` :
1109
+
1100
1110
``` diff
1111
+ export default defineNuxtConfig({
1101
1112
alias: {
1102
1113
'@sf-modules': path.resolve(__dirname, '.', 'sf-modules'),
1103
1114
'@sf-modules-middleware': path.resolve(__dirname, '..', 'storefront-middleware', 'sf-modules'),
1104
1115
+ 'storefront-middleware': path.resolve(__dirname, '..', 'storefront-middleware'),
1105
1116
},
1117
+ });
1106
1118
```
1107
1119
::
1108
1120
@@ -1159,7 +1171,7 @@ Update `apps/playwright/package.json`:
1159
1171
:: tabs { :titles =' ["Next.js", "Nuxt"] ' }
1160
1172
1161
1173
#tab-1
1162
- Update server configurations in ` apps/playwright/setup/framework/nextjs/server-dev.ts ` and ` server.ts ` to include envs and error handling:
1174
+ Update ` server ` const in ` apps/playwright/setup/framework/nextjs/server-dev.ts ` and ` apps/playwright/setup/framework/nextjs/ server.ts` to include envs and error handling:
1163
1175
``` ts
1164
1176
const server = exec (
1165
1177
' yarn dev' ,
@@ -1173,11 +1185,14 @@ const server = exec(
1173
1185
TEST_BUILD_DIR: join (' .next' , ' test' , ` ${workerInfo .workerIndex } ` ),
1174
1186
},
1175
1187
},
1176
- (error ) => {
1188
+ (error : unknown ) => {
1177
1189
if (error !== null ) {
1178
- debug && console .log (` [WORKER ${workerInfo .workerIndex }] Next.js server encountered an error: ${error } ` );
1190
+ debug &&
1191
+ console .log (
1192
+ ` [WORKER ${workerInfo .workerIndex }] Next.js server encountered an error: ${error } ` ,
1193
+ );
1179
1194
}
1180
- }
1195
+ },
1181
1196
);
1182
1197
```
1183
1198
@@ -1229,7 +1244,7 @@ yarn add @alokai/cli@0.2.0 cross-env -W
1229
1244
#step-5
1230
1245
### Set Up Alokai Configuration
1231
1246
1232
- 1 . Create ` alokai.config.json ` :
1247
+ 1 . Create ` alokai.config.json ` in the root of the project :
1233
1248
``` json
1234
1249
{
1235
1250
"$schema" : " node_modules/@alokai/cli/dist/static/alokaiConfigSchema.json" ,
@@ -1245,7 +1260,7 @@ yarn add @alokai/cli@0.2.0 cross-env -W
1245
1260
1246
1261
After setting up the Alokai configuration, create your first store:
1247
1262
``` bash
1248
- yarn exec alokai-cli store add
1263
+ yarn store add
1249
1264
```
1250
1265
1251
1266
::tip Store Name
0 commit comments