-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate hydrogen-react into the hydrogen monorepo #605
Changes from 179 commits
758dce9
1c33524
494e620
aad3091
da7fb02
70bbf6c
de0d40b
df400c2
352fdc1
5e04cb5
12613eb
0ff3bb3
ccce9f9
38ec2af
9e3aab2
042b07a
f11fe15
2c5d34d
5ec9c3d
3e807d0
7e106f4
ffd44dd
a3bda06
a36e228
3c54a21
41caf55
f4a0aa5
1e3ce50
7fb60a6
b9c3940
71fa977
51c4896
0b95868
44bd568
72a7e80
a40228a
a189e32
eb1f780
9c25a6c
702df8f
117ad0e
00ba187
de1d160
72f8a5c
ee2d59c
256f5b7
5229051
71b78b0
a4507ec
2250b0d
3eab955
1ccbd1c
a34f44d
df7320b
3055303
5b3f529
140c89a
f7a3932
8005144
fc01865
d31be71
6c9d0f7
f1cb723
3add3be
80c454e
676eb75
2822dee
0683765
ccfbbbd
94fdddd
2dc6ac4
a6c2b91
90b5ccf
ad4aca4
84705d0
669809a
6a3a0b3
996a197
a776e01
f1ffd57
b1989c9
e0b154a
6fa0f49
6bfff92
c45d147
de1429e
f570f72
203abf9
d2e5d4e
3d3d123
2163c6c
c1359eb
f0614cd
da3387a
ea3e88e
8ee1ffb
9bff83c
541cac7
cfd8626
ebab9ba
6783a31
5c16c78
ea3959b
de6362b
9e022a4
49fd663
15d5616
3555603
8b463ac
a6e373a
2ea046f
16b6b81
79126b4
58f5c66
12b3239
736cc41
f47933b
5c5c6b6
e4124cf
739cc1a
65d5bb2
5748052
6184517
18c9bb1
2849b93
6fc7abf
2231836
af84387
84f439d
804365f
8d8ab13
99392f9
7a27dfa
ec6abbb
2e7c3af
d35dc8b
f959cc8
afa2524
3309706
40438a0
f8b4774
3ab603c
b8757bd
eb1656f
c8c9aa3
344c4ed
e9d32d4
185d165
07971b3
78118e0
15f1499
9d39d7b
b6e54bd
6225d33
b8efad0
ee2d134
2bb8c81
8a75ef6
8e0752f
9f025d3
35b1986
37d036f
67da795
0152f3d
8302b55
51b73d1
42ace72
1a0dc0c
7ca6891
293495d
cde3165
607ddf1
9bf5461
6db28b5
8ed057f
8d5a3f4
dd240a5
295eab1
03dcc0b
7ef939e
6da7cf3
ba12e34
e0a1dfc
8f71141
6d7ca12
d85ba01
6c65426
246c29d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
build | ||
node_modules | ||
bin | ||
*.d.ts | ||
*.d.ts | ||
dist | ||
coverage | ||
packages/hydrogen-react/codegen.ts | ||
packages/hydrogen-react/vite.config.ts | ||
packages/hydrogen-react/vitest.setup.ts |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# This file should be part of the demo-store template, but the GraphQL VSCode plugin doesn't actually look at folders when searching for this file, so it has to live at the root. | ||
# There is a duplicated file in templates/demo-store/ , and it's kept there so that if someone were to spin up the demo-store on their own then it would be included and "just work" | ||
schema: node_modules/@shopify/hydrogen-react/storefront.schema.json | ||
schema: packages/hydrogen-react/storefront.schema.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
node_modules | ||
build | ||
packages/cli/oclif.manifest.json | ||
dist | ||
packages/hydrogen-react/storefront.schema.json | ||
coverage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<p align="center"> | ||
<a href="https://hydrogen.shopify.dev"><img src="./.github/images/hydrogen-logo.svg" alt="Hydrogen Logo"/></a> | ||
</p> | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/@shopify/hydrogen"><img src="https://img.shields.io/npm/v/@shopify/hydrogen.svg?sanitize=true" alt="Version"></a> | ||
<a href="https://github.com/Shopify/hydrogen/blob/main/LICENSE.md"><img src="https://img.shields.io/npm/l/@shopify/hydrogen.svg?sanitize=true" alt="License"></a> | ||
<a href="https://npmcharts.com/compare/@shopify/hydrogen?minimal=true"><img src="https://img.shields.io/npm/dm/@shopify/hydrogen.svg?sanitize=true" alt="Downloads"></a> | ||
</p> | ||
<div style="text-align: center;"> | ||
|
||
[![MIT License](https://img.shields.io/github/license/shopify/hydrogen)](LICENSE.md) | ||
[![npm downloads](https://img.shields.io/npm/dm/@shopify/hydrogen.svg?sanitize=true)](https://npmcharts.com/compare/@shopify/hydrogen?minimal=true) | ||
|
||
</div> | ||
<div align="center"> | ||
|
||
📚 [Docs](https://shopify.dev/custom-storefronts/hydrogen) | 🗣 [Discord](https://discord.gg/Hefq6w5c5d) | 💬 [Discussions](https://github.com/Shopify/hydrogen/discussions) | 📝 [Changelog](./packages/hydrogen/CHANGELOG.md) | ||
|
@@ -17,49 +17,51 @@ Hydrogen is a set of tools, utilities, and best-in-class examples for building a | |
|
||
Hydrogen legacy v1, which is not built on Remix, is available here: https://github.com/Shopify/hydrogen-v1 | ||
|
||
Get started with Hydrogen with the instructions below ⬇️ | ||
|
||
## Getting Started | ||
## Getting started with Hydrogen | ||
|
||
**Requirements:** | ||
|
||
- Node.js version 16.14.0 or higher | ||
- `npm`, `yarn` or `pnpm` | ||
- `npm` version 8.3.1 (or your package manager of choice, such as `yarn` or `pnpm`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this specific version of npm? 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was an addition by @gfscott ; thoughts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would not add npm version, unless there was a requirement for a certain version |
||
|
||
1. Install the latest version of Hydrogen: | ||
|
||
**Installation:** | ||
```bash | ||
npm create @shopify/hydrogen@latest | ||
``` | ||
|
||
```bash | ||
# Using `npm` | ||
npm create @shopify/hydrogen@latest | ||
1. Run the local development server: | ||
|
||
# Using `yarn` | ||
yarn create @shopify/hydrogen@latest | ||
```bash | ||
npm install | ||
npm run dev | ||
``` | ||
|
||
# Using `pnpm` | ||
pnpm create @shopify/hydrogen@latest | ||
``` | ||
1. Open your new Hydrogen app running at http://localhost:3000. | ||
|
||
**Running locally:** | ||
See the complete [Hydrogen docs](https://shopify.dev/custom-storefronts/hydrogen). | ||
|
||
1. Start a development server | ||
## Packages in this repo | ||
|
||
```bash | ||
# Using `npm` | ||
npm install | ||
npm run dev | ||
Hydrogen is organized as a [monorepo](https://monorepo.tools/), which includes multiple packages that can be used together. | ||
|
||
# Using `yarn` | ||
yarn install | ||
yarn dev | ||
| Package | Latest version | Description | Readme | | ||
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | ||
| [`@shopify/hydrogen`](/packages/hydrogen/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/hydrogen/latest.svg)](https://www.npmjs.com/package/@shopify/hydrogen) | Opinionated tools, utilities, and best-in-class examples for building a commerce application with Remix. | [Readme](/packages/hydrogen#readme) | | ||
| [`@shopify/hydrogen-react`](/packages/hydrogen-react/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/hydrogen-react/latest.svg)](https://www.npmjs.com/package/@shopify/hydrogen-react) | Unopionated and performant library of Shopify-specific commerce components, hooks, and utilities. | [Readme](/packages/hydrogen-react#readme) | | ||
| [`@shopify/cli-hydrogen`](/packages/cli/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/cli-hydrogen/latest.svg)](https://www.npmjs.com/package/@shopify/cli-hydrogen) | Hydrogen extension for [Shopify CLI](https://shopify.dev/docs/custom-storefronts/hydrogen/cli). | [Readme](/packages/cli#readme) | | ||
| [`@shopify/create-hydrogen`](/packages/create-hydrogen/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/create-hydrogen/latest.svg)](https://www.npmjs.com/package/@shopify/create-hydrogen) | Generate a new Hydrogen project from the command line. | [Readme](/packages/create-hydrogen#readme) | | ||
| [`@shopify/remix-oxygen`](/packages/remix-oxygen/) | [![Latest badge](https://img.shields.io/npm/v/@shopify/remix-oxygen/latest.svg)](https://www.npmjs.com/package/@shopify/remix-oxygen) | Remix adapter enabling Hydrogen to run on the [Oxygen](https://shopify.dev/custom-storefronts/oxygen) runtime. | [Readme](/packages/remix-oxygen#readme) | | ||
|
||
# Using `pnpm` | ||
pnpm install | ||
pnpm dev | ||
``` | ||
## Versioning | ||
|
||
2. Visit the development environment running at http://localhost:3000. | ||
Hydrogen and hydrogen-react is tied to specific versions of the [Shopify Storefront API](https://shopify.dev/api/storefront), which follows [calver](https://calver.org/). | ||
frehner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Learn more about [getting started with Hydrogen](https://shopify.dev/custom-storefronts/hydrogen). | ||
For example, if you're using Storefront API version `2023-01`, then Hydrogen and hydrogen-react versions `2022.1.x` are fully compatible. | ||
|
||
If the Storefront API version update includes breaking changes, then Hydrogen and hydrogen-react may also include breaking changes. Because the API version is updated every three months, breaking changes could occur every three months. | ||
|
||
Learn more about API [release schedules](https://shopify.dev/api/usage/versioning#release-schedule) at Shopify. | ||
|
||
## Contributing to Hydrogen | ||
|
||
|
@@ -68,9 +70,3 @@ Learn more about [getting started with Hydrogen](https://shopify.dev/custom-stor | |
## Other handy links | ||
|
||
[Learn more about Hydrogen](https://shopify.dev/hydrogen). | ||
|
||
👷♀️ Add `npm` packages to your project: | ||
|
||
- [`@shopify/hydrogen`](https://www.npmjs.com/package/@shopify/hydrogen) | ||
- [`@shopify/cli-hydrogen`](https://www.npmjs.com/package/@shopify/cli-hydrogen) | ||
- [`@shopify/remix-oxygen`](https://www.npmjs.com/package/@shopify/remix-oxygen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in the
prettier
job, so the name needed to be updated.