Skip to content

Commit

Permalink
Merge branch 'Weaverse:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hta218 authored Jun 13, 2024
2 parents b675e69 + aaafe8e commit 08015e7
Show file tree
Hide file tree
Showing 6 changed files with 1,458 additions and 473 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2023-present, Weaverse JSC.
Copyright 2024-present, Weaverse JSC.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
31 changes: 4 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ _Pilot is an innovative Shopify theme, powered by Hydrogen, Remix, and Weaverse,

## Demo

- [Live store](https://pilot.weaverse.dev)
- Try customizing Pilot on [Weaverse Playground](https://studio.weaverse.io/demo)
- Live store: https://pilot.weaverse.dev
- Try customizing Pilot on Weaverse Playground: https://studio.weaverse.io/demo
![demo](https://cdn.shopify.com/s/files/1/0693/8201/3220/files/Home.png?v=1695816170)

## What's included

- Remix
- Hydrogen
- Oxygen
Expand All @@ -27,6 +26,7 @@ _Pilot is an innovative Shopify theme, powered by Hydrogen, Remix, and Weaverse,
- GraphQL generator
- TypeScript and JavaScript flavors
- Tailwind CSS (via PostCSS)
- New Shopify customer account API
- Full-featured setup of components and routes
- Fully customizable inside [Weaverse](https://weaverse.io)

Expand Down Expand Up @@ -163,7 +163,7 @@ function App() {
export default withWeaverse(App);
```

### Create a section
### Create a section/component

To create a section, you need to create a new file in [`app/sections`](app/sections) directory and register it in [`app/weaverse/components.ts`](app/weaverse/components.ts) file.

Expand Down Expand Up @@ -272,29 +272,6 @@ Weaverse provides a convenient way to customize your theme inside the **Weaverse

![Weaverse Editor](https://cdn.shopify.com/s/files/1/0838/0052/3057/files/playground.jpg?v=1699244445)

## Setup for using Customer Account API (`/account`)

1. Run development with `--customer-account-push__unstable` flag to start the server with a tunnel to expose the local server to the public domain.

```bash
shopify hydrogen dev --codegen --port 3456 --customer-account-push__unstable
```

Or quicker way with:

```bash
npm run dev:ca
```

### Include public domain in Customer Account API settings

After run the server with `--customer-account-push__unstable` flag, you will get a public domain like `https://<your-cf-tunnel>.tryhydrogen.dev`. And it should be automatically added to the Customer Account API settings. If not, you can manually add it by following these steps:

1. Go to your Shopify admin => `Hydrogen` or `Headless` app/channel => Customer Account API => Application setup
2. Edit `Callback URI(s)` to include `https://<your-cf-tunnel>.tryhydrogen.dev/account/authorize`
3. Edit `Javascript origin(s)` to include your public domain `https://<your-tunnel>.tryhydrogen.dev` or keep it blank
4. Edit `Logout URI` to include your public domain `https://<your-tunnel>.tryhydrogen.dev` or keep it blank

### Local development inspects

- Hydrogen app: http://localhost:3456
Expand Down
22 changes: 22 additions & 0 deletions guides/customer-account-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Setup for using Customer Account API (`/account`)

1. Run development with `--customer-account-push__unstable` flag to start the server with a tunnel to expose the local server to the public domain.

```bash
shopify hydrogen dev --codegen --port 3456 --customer-account-push__unstable
```

Or quicker way with:

```bash
npm run dev:ca
```

### Include public domain in Customer Account API settings

After run the server with `--customer-account-push__unstable` flag, you will get a public domain like `https://<your-cf-tunnel>.tryhydrogen.dev`. And it should be automatically added to the Customer Account API settings. If not, you can manually add it by following these steps:

1. Go to your Shopify admin => `Hydrogen` or `Headless` app/channel => Customer Account API => Application setup
2. Edit `Callback URI(s)` to include `https://<your-cf-tunnel>.tryhydrogen.dev/account/authorize`
3. Edit `Javascript origin(s)` to include your public domain `https://<your-tunnel>.tryhydrogen.dev` or keep it blank
4. Edit `Logout URI` to include your public domain `https://<your-tunnel>.tryhydrogen.dev` or keep it blank
16 changes: 8 additions & 8 deletions sync-project.md → guides/sync-project.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
### How to make your own project in sync with the original pilot project

Once you've cloned the pilot project, and put it into your own github account, you'll want to keep it in sync with the
Once you've cloned the pilot project, and put it into your own Github account, you'll want to keep it in sync with the
original pilot project. This is a good idea because the original pilot project will be updated with new features and bug
fixes.
Here is the manual way to do it with rsync:

1. Clone the original pilot project into a directory called `pilot`:
Here is the manual way to do it with `rsync`:

1. Clone the latest `pilot` project into a directory called `pilot`:

```bash
git clone [email protected]:Weaverse/pilot.git
```

2. Put your own pilot project into a same level directory.

3. Run the following command to sync your project with the original pilot project, Keep in mind to
replace `your-pilot-project` with the name of your own pilot project.
3. Run the following command to sync your project with the original pilot project, Keep in mind to replace `your-pilot-project` with the name of your own pilot project.

```bash
rsync -arv --exclude=node_modules --exclude=.git --exclude=.cache --exclude=.turbo --exclude=dist --exclude=.env ./pilot/ ./your-pilot-project
rsync -arv --exclude=node_modules --exclude=.git --exclude=.cache --exclude=.turbo --exclude=dist --exclude=.env ./pilot/ ./<your-pilot-project>
```

4. Commit and push your changes to your own pilot project.
5. It is recommended to run the sync command every time you want to update your project with the latest changes from the
original pilot project.

5. It is recommended to run the sync command every time you want to update your project with the latest changes from the original pilot project.
Loading

0 comments on commit 08015e7

Please sign in to comment.