Skip to content

Commit c7d9e64

Browse files
Merge pull request #168 from Shopify/payment-delivery-templates-js
JavaScript and TypeScript templates for payment and delivery customizations
2 parents 685e522 + 14c555d commit c7d9e64

File tree

13 files changed

+7563
-0
lines changed

13 files changed

+7563
-0
lines changed

.graphqlrc.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const projects = {
2828
...getProjects("sample-apps/discounts/extensions"),
2929
...getProjects("checkout/rust/delivery-customization"),
3030
...getProjects("checkout/rust/payment-customization"),
31+
...getProjects("checkout/javascript/delivery-customization"),
32+
...getProjects("checkout/javascript/payment-customization"),
3133
...getProjects("discounts/rust/order-discounts"),
3234
...getProjects("discounts/rust/product-discounts"),
3335
...getProjects("discounts/rust/shipping-discounts"),
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
generated
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
query Input {
2+
deliveryCustomization {
3+
metafield(namespace: "$app:{{name | replace: " ", "-" | downcase}}", key: "function-configuration") {
4+
value
5+
}
6+
}
7+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "{{name}}",
3+
"version": "0.0.1",
4+
"license": "UNLICENSED",
5+
"scripts": {
6+
"shopify": "npm exec -- shopify",
7+
"typegen": "npm exec -- shopify app function typegen",
8+
"build": "npm exec -- shopify app function build",
9+
"preview": "npm exec -- shopify app function run"
10+
},
11+
"codegen": {
12+
"schema": "schema.graphql",
13+
"documents": "input.graphql",
14+
"generates": {
15+
"./generated/api.ts": {
16+
"plugins": [
17+
"typescript",
18+
"typescript-operations"
19+
]
20+
}
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)