@shopify/shop-minis-cli 0.0.161 → 0.0.162
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/build/commands/create-mini/standalone/examples/with-camera-access/.eslintignore +1 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/.eslintrc.js +3 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/.graphqlrc.js +1 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/.prettierrc.json +8 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/README.md +30 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/assets.d.ts +14 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/babel.config.js +5 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/index.tsx +5 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/metro.config.js +3 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/package.json +33 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/src/App.tsx +152 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/src/index.tsx +9 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/src/manifest.json +5 -0
- package/build/commands/create-mini/standalone/examples/with-camera-access/tsconfig.json +41 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/.eslintignore +1 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/.eslintrc.js +3 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/.graphqlrc.js +1 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/.prettierrc.json +8 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/README.md +46 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/assets.d.ts +14 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/babel.config.js +5 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/index.tsx +5 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/metro.config.js +3 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/package.json +33 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/src/App.tsx +5 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/src/index.tsx +9 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/src/manifest.json +21 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/src/screens/HomeScreen.tsx +142 -0
- package/build/commands/create-mini/standalone/examples/with-fal-ai/tsconfig.json +41 -0
- package/build/commands/create-mini/standalone/examples/with-getting-started/README.md +18 -0
- package/build/commands/create-mini/standalone/examples/with-getting-started/package.json +3 -3
- package/build/commands/create-mini/standalone/examples/with-search/.eslintignore +1 -0
- package/build/commands/create-mini/standalone/examples/with-search/.eslintrc.js +3 -0
- package/build/commands/create-mini/standalone/examples/with-search/.graphqlrc.js +1 -0
- package/build/commands/create-mini/standalone/examples/with-search/.prettierrc.json +8 -0
- package/build/commands/create-mini/standalone/examples/with-search/README.md +25 -0
- package/build/commands/create-mini/standalone/examples/with-search/assets.d.ts +14 -0
- package/build/commands/create-mini/standalone/examples/with-search/babel.config.js +5 -0
- package/build/commands/create-mini/standalone/examples/with-search/index.tsx +5 -0
- package/build/commands/create-mini/standalone/examples/with-search/metro.config.js +3 -0
- package/build/commands/create-mini/standalone/examples/with-search/package.json +33 -0
- package/build/commands/create-mini/standalone/examples/with-search/src/App.tsx +23 -0
- package/build/commands/create-mini/standalone/examples/with-search/src/components/HeaderAction.tsx +32 -0
- package/build/commands/create-mini/standalone/examples/with-search/src/components/ShopCard.tsx +92 -0
- package/build/commands/create-mini/standalone/examples/with-search/src/index.tsx +9 -0
- package/build/commands/create-mini/standalone/examples/with-search/src/manifest.json +7 -0
- package/build/commands/create-mini/standalone/examples/with-search/src/screens/MerchantSearchScreen.tsx +126 -0
- package/build/commands/create-mini/standalone/examples/with-search/src/screens/ProductSearchScreen.tsx +115 -0
- package/build/commands/create-mini/standalone/examples/with-search/src/types/screens.ts +6 -0
- package/build/commands/create-mini/standalone/examples/with-search/tsconfig.json +41 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/.eslintignore +1 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/.eslintrc.js +3 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/.graphqlrc.js +1 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/.prettierrc.json +8 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/README.md +26 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/assets.d.ts +14 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/babel.config.js +5 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/index.tsx +5 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/metro.config.js +3 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/package.json +33 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/src/App.tsx +5 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/src/components/ProductSection.tsx +39 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/src/components/SectionStyles.ts +9 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/src/components/ShopCard.tsx +42 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/src/components/ShopSection.tsx +40 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/src/index.tsx +9 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/src/manifest.json +10 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/src/screens/HomeScreen.tsx +67 -0
- package/build/commands/create-mini/standalone/examples/with-user-data/tsconfig.json +41 -0
- package/build/commands/create-mini/standalone/index.js +11 -4
- package/build/commands/create-mini/standalone/index.js.map +1 -1
- package/build/commands/create-mini/utils/examples.d.ts +3 -3
- package/build/commands/create-mini/utils/examples.js +16 -7
- package/build/commands/create-mini/utils/examples.js.map +1 -1
- package/build/commands/create-mini/utils/index.js.map +1 -1
- package/build/utils/package-manager.d.ts +7 -0
- package/build/utils/package-manager.js +15 -0
- package/build/utils/package-manager.js.map +1 -1
- package/package.json +1 -1
- package/scripts/test-create-mini-standalone.ts +24 -7
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
import {execSync} from 'node:child_process'
|
|
2
|
+
import {readdir} from 'node:fs/promises'
|
|
3
|
+
import path from 'node:path'
|
|
2
4
|
|
|
3
5
|
import {Command} from 'commander'
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
const __dirname = path.resolve()
|
|
6
8
|
|
|
7
9
|
const program = new Command()
|
|
8
10
|
.name('test-create-mini-standalone')
|
|
9
11
|
.description('Creates a standalone mini and checks that it is valid')
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
+
.argument('<example-name>', 'Name of the example to use')
|
|
13
|
+
.action(async (exampleName: string) => {
|
|
14
|
+
const examples = await readdir(
|
|
15
|
+
path.join(
|
|
16
|
+
__dirname,
|
|
17
|
+
'src',
|
|
18
|
+
'commands',
|
|
19
|
+
'create-mini',
|
|
20
|
+
'standalone',
|
|
21
|
+
'examples'
|
|
22
|
+
)
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
if (!examples.includes(exampleName)) {
|
|
12
26
|
console.log(
|
|
13
|
-
`\n${
|
|
27
|
+
`\n${exampleName} is not a valid example name. Please use one of ${examples.join(
|
|
14
28
|
', '
|
|
15
29
|
)}\n`
|
|
16
30
|
)
|
|
@@ -25,9 +39,12 @@ const program = new Command()
|
|
|
25
39
|
execSync('rm -rf ../minis/test-standalone', {stdio: 'inherit'}) // just in case this wasn't deleted before
|
|
26
40
|
|
|
27
41
|
// build mini
|
|
28
|
-
execSync(
|
|
29
|
-
|
|
30
|
-
|
|
42
|
+
execSync(
|
|
43
|
+
`yarn shop-minis create test-standalone --example ${exampleName} --output-dir ../minis/`,
|
|
44
|
+
{
|
|
45
|
+
stdio: 'inherit',
|
|
46
|
+
}
|
|
47
|
+
)
|
|
31
48
|
|
|
32
49
|
// print package.json
|
|
33
50
|
execSync(`cat ../minis/test-standalone/package.json`, {stdio: 'inherit'})
|