Skip to content

Commit 69e2b36

Browse files
JS order discounts examples (#172)
* Initial JavaScript implementation of order-discounts default Function. * Add order-discounts/fixed-amount example. * Adding shipping-discounts default * Adding shipping discount fixed-amount example * Adding product-discounts fixed-amount example
1 parent c7d9e64 commit 69e2b36

File tree

12 files changed

+7894
-0
lines changed

12 files changed

+7894
-0
lines changed
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+
discountNode {
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)