Skip to content

Commit 3b0f4db

Browse files
authored
Merge pull request #407 from Shopify/cart-transform-dev-preview
Cart Transform: adding additional examples with move to GA
2 parents 9ff5ad8 + 535b3b8 commit 3b0f4db

40 files changed

+7176
-0
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ exclude = [
1010
"sample-apps/payment-customizations/extensions/payment-customization-js/",
1111
"sample-apps/bundles-cart-transform/extensions/cart-expand-js/",
1212
"sample-apps/order-submission-rules/extensions/order-submission-rule-js/",
13+
"sample-apps/bundles-price-per-component/extensions/price-per-component-js",
14+
"sample-apps/optional-add-ons-cart-transform/extensions/optional-add-ons-js",
15+
"sample-apps/update-line-item/extensions/update-line-item-js",
1316
]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Environment Configuration
2+
.env
3+
.env.*
4+
5+
# Dependency directory
6+
node_modules
7+
8+
# Test coverage directory
9+
coverage
10+
11+
# Ignore Apple macOS Desktop Services Store
12+
.DS_Store
13+
14+
# Logs
15+
logs
16+
*.log
17+
18+
# extensions build output
19+
extensions/*/build
20+
21+
# lock files
22+
package-lock.json
23+
yarn.lock
24+
pnpm-lock.yaml
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
engine-strict=true
2+
auto-install-peers=true
3+
shamefully-hoist=true
4+
@shopify:registry=https://registry.npmjs.org
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Shopify App Template - None (app with extensions only)
2+
3+
This is a template for building a [Shopify app](https://shopify.dev/docs/apps/getting-started) that includes no app home UI. It contains the basics for building a Shopify app that uses only app extensions.
4+
5+
**If you plan for your app to load its own page in the Shopify Admin, then you'll want to choose one of our other templates.**
6+
7+
Whether you choose to use this template or another one, you can use your preferred package manager and the Shopify CLI with [these steps](#installing-the-template).
8+
9+
## Benefits
10+
11+
Shopify apps are built on a variety of Shopify tools to create a great merchant experience. The [create an app](https://shopify.dev/docs/apps/getting-started/create) tutorial in our developer documentation will guide you through creating a Shopify app.
12+
13+
This app template does little more than install the CLI and scaffold a respository.
14+
15+
## Getting started
16+
17+
### Requirements
18+
19+
1. You must [download and install Node.js](https://nodejs.org/en/download/) if you don't already have it.
20+
1. You must [create a Shopify partner account](https://partners.shopify.com/signup) if you don’t have one.
21+
1. You must create a store for testing if you don't have one, either a [development store](https://help.shopify.com/en/partners/dashboard/development-stores#create-a-development-store) or a [Shopify Plus sandbox store](https://help.shopify.com/en/partners/dashboard/managing-stores/plus-sandbox-store).
22+
23+
### Installing the template
24+
25+
This template can be installed using your preferred package manager:
26+
27+
Using yarn:
28+
29+
```shell
30+
yarn create @shopify/app
31+
```
32+
33+
Using npm:
34+
35+
```shell
36+
npm init @shopify/app@latest
37+
```
38+
39+
Using pnpm:
40+
41+
```shell
42+
pnpm create @shopify/app@latest
43+
```
44+
45+
This will clone the template and install the required dependencies.
46+
47+
#### Local Development
48+
49+
[The Shopify CLI](https://shopify.dev/docs/apps/tools/cli) connects to an app in your Partners dashboard. It provides environment variables and runs commands in parallel..
50+
51+
You can develop locally using your preferred package manager. Run one of the following commands from the root of your app.
52+
53+
Using yarn:
54+
55+
```shell
56+
yarn dev
57+
```
58+
59+
Using npm:
60+
61+
```shell
62+
npm run dev
63+
```
64+
65+
Using pnpm:
66+
67+
```shell
68+
pnpm run dev
69+
```
70+
71+
Open the URL generated in your console. Once you grant permission to the app, you can start development (such as generating extensions).
72+
73+
## Developer resources
74+
75+
- [Introduction to Shopify apps](https://shopify.dev/docs/apps/getting-started)
76+
- [App authentication](https://shopify.dev/docs/apps/auth)
77+
- [Shopify CLI](https://shopify.dev/docs/apps/tools/cli)
78+
- [Shopify API Library documentation](https://github.com/Shopify/shopify-api-js#readme)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
generated
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "price-per-component-expand-example",
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+
"test": "vitest"
11+
},
12+
"codegen": {
13+
"schema": "schema.graphql",
14+
"documents": "src/*.graphql",
15+
"generates": {
16+
"./generated/api.ts": {
17+
"plugins": [
18+
"typescript",
19+
"typescript-operations"
20+
]
21+
}
22+
},
23+
"config": {
24+
"omitOperationSuffix": true
25+
}
26+
},
27+
"devDependencies": {
28+
"vitest": "^0.29.8"
29+
},
30+
"dependencies": {
31+
"@shopify/shopify_function": "0.1.0",
32+
"javy": "0.1.1"
33+
}
34+
}

0 commit comments

Comments
 (0)