hydrogen-forge 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +212 -0
- package/dist/commands/add.d.ts +7 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +123 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/create.d.ts +8 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +160 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/setup-mcp.d.ts +7 -0
- package/dist/commands/setup-mcp.d.ts.map +1 -0
- package/dist/commands/setup-mcp.js +179 -0
- package/dist/commands/setup-mcp.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/generators.d.ts +6 -0
- package/dist/lib/generators.d.ts.map +1 -0
- package/dist/lib/generators.js +470 -0
- package/dist/lib/generators.js.map +1 -0
- package/dist/lib/utils.d.ts +17 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +101 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +54 -0
- package/templates/starter/.env.example +21 -0
- package/templates/starter/.graphqlrc.ts +27 -0
- package/templates/starter/README.md +117 -0
- package/templates/starter/app/assets/favicon.svg +28 -0
- package/templates/starter/app/components/AddToCartButton.tsx +102 -0
- package/templates/starter/app/components/Aside.tsx +136 -0
- package/templates/starter/app/components/CartLineItem.tsx +229 -0
- package/templates/starter/app/components/CartMain.tsx +131 -0
- package/templates/starter/app/components/CartSummary.tsx +315 -0
- package/templates/starter/app/components/CollectionFilters.tsx +330 -0
- package/templates/starter/app/components/CollectionGrid.tsx +141 -0
- package/templates/starter/app/components/Footer.tsx +218 -0
- package/templates/starter/app/components/Header.tsx +296 -0
- package/templates/starter/app/components/PageLayout.tsx +174 -0
- package/templates/starter/app/components/PaginatedResourceSection.tsx +41 -0
- package/templates/starter/app/components/ProductCard.tsx +151 -0
- package/templates/starter/app/components/ProductForm.tsx +156 -0
- package/templates/starter/app/components/ProductGallery.tsx +164 -0
- package/templates/starter/app/components/ProductGrid.tsx +64 -0
- package/templates/starter/app/components/ProductImage.tsx +23 -0
- package/templates/starter/app/components/ProductItem.tsx +44 -0
- package/templates/starter/app/components/ProductPrice.tsx +97 -0
- package/templates/starter/app/components/SearchDialog.tsx +599 -0
- package/templates/starter/app/components/SearchForm.tsx +68 -0
- package/templates/starter/app/components/SearchFormPredictive.tsx +76 -0
- package/templates/starter/app/components/SearchResults.tsx +161 -0
- package/templates/starter/app/components/SearchResultsPredictive.tsx +461 -0
- package/templates/starter/app/entry.client.tsx +21 -0
- package/templates/starter/app/entry.server.tsx +53 -0
- package/templates/starter/app/graphql/customer-account/CustomerAddressMutations.ts +64 -0
- package/templates/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +40 -0
- package/templates/starter/app/graphql/customer-account/CustomerOrderQuery.ts +90 -0
- package/templates/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +63 -0
- package/templates/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +25 -0
- package/templates/starter/app/lib/context.ts +60 -0
- package/templates/starter/app/lib/fragments.ts +234 -0
- package/templates/starter/app/lib/orderFilters.ts +90 -0
- package/templates/starter/app/lib/redirect.ts +23 -0
- package/templates/starter/app/lib/search.ts +79 -0
- package/templates/starter/app/lib/session.ts +72 -0
- package/templates/starter/app/lib/variants.ts +46 -0
- package/templates/starter/app/root.tsx +209 -0
- package/templates/starter/app/routes/$.tsx +11 -0
- package/templates/starter/app/routes/[robots.txt].tsx +117 -0
- package/templates/starter/app/routes/[sitemap.xml].tsx +16 -0
- package/templates/starter/app/routes/_index.tsx +167 -0
- package/templates/starter/app/routes/account.$.tsx +9 -0
- package/templates/starter/app/routes/account._index.tsx +5 -0
- package/templates/starter/app/routes/account.addresses.tsx +516 -0
- package/templates/starter/app/routes/account.orders.$id.tsx +222 -0
- package/templates/starter/app/routes/account.orders._index.tsx +222 -0
- package/templates/starter/app/routes/account.profile.tsx +133 -0
- package/templates/starter/app/routes/account.tsx +97 -0
- package/templates/starter/app/routes/account_.authorize.tsx +5 -0
- package/templates/starter/app/routes/account_.login.tsx +7 -0
- package/templates/starter/app/routes/account_.logout.tsx +11 -0
- package/templates/starter/app/routes/api.$version.[graphql.json].tsx +14 -0
- package/templates/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +129 -0
- package/templates/starter/app/routes/blogs.$blogHandle._index.tsx +175 -0
- package/templates/starter/app/routes/blogs._index.tsx +109 -0
- package/templates/starter/app/routes/cart.$lines.tsx +70 -0
- package/templates/starter/app/routes/cart.tsx +117 -0
- package/templates/starter/app/routes/collections.$handle.tsx +161 -0
- package/templates/starter/app/routes/collections._index.tsx +133 -0
- package/templates/starter/app/routes/collections.all.tsx +122 -0
- package/templates/starter/app/routes/discount.$code.tsx +48 -0
- package/templates/starter/app/routes/pages.$handle.tsx +88 -0
- package/templates/starter/app/routes/policies.$handle.tsx +93 -0
- package/templates/starter/app/routes/policies._index.tsx +69 -0
- package/templates/starter/app/routes/products.$handle.tsx +232 -0
- package/templates/starter/app/routes/search.tsx +426 -0
- package/templates/starter/app/routes/sitemap.$type.$page[.xml].tsx +23 -0
- package/templates/starter/app/routes.ts +9 -0
- package/templates/starter/app/styles/app.css +574 -0
- package/templates/starter/app/styles/reset.css +139 -0
- package/templates/starter/app/styles/tailwind.css +116 -0
- package/templates/starter/customer-accountapi.generated.d.ts +543 -0
- package/templates/starter/env.d.ts +7 -0
- package/templates/starter/eslint.config.js +247 -0
- package/templates/starter/guides/predictiveSearch/predictiveSearch.jpg +0 -0
- package/templates/starter/guides/predictiveSearch/predictiveSearch.md +394 -0
- package/templates/starter/guides/search/search.jpg +0 -0
- package/templates/starter/guides/search/search.md +335 -0
- package/templates/starter/package.json +71 -0
- package/templates/starter/postcss.config.js +6 -0
- package/templates/starter/public/.gitkeep +0 -0
- package/templates/starter/react-router.config.ts +13 -0
- package/templates/starter/server.ts +59 -0
- package/templates/starter/storefrontapi.generated.d.ts +1264 -0
- package/templates/starter/tailwind.config.js +83 -0
- package/templates/starter/tsconfig.json +67 -0
- package/templates/starter/vite.config.ts +32 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
content: ['./app/**/*.{js,ts,jsx,tsx}'],
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {
|
|
6
|
+
colors: {
|
|
7
|
+
// Custom brand colors - override as needed
|
|
8
|
+
primary: {
|
|
9
|
+
50: '#f0f9ff',
|
|
10
|
+
100: '#e0f2fe',
|
|
11
|
+
200: '#bae6fd',
|
|
12
|
+
300: '#7dd3fc',
|
|
13
|
+
400: '#38bdf8',
|
|
14
|
+
500: '#0ea5e9',
|
|
15
|
+
600: '#0284c7',
|
|
16
|
+
700: '#0369a1',
|
|
17
|
+
800: '#075985',
|
|
18
|
+
900: '#0c4a6e',
|
|
19
|
+
950: '#082f49',
|
|
20
|
+
},
|
|
21
|
+
secondary: {
|
|
22
|
+
50: '#fafafa',
|
|
23
|
+
100: '#f4f4f5',
|
|
24
|
+
200: '#e4e4e7',
|
|
25
|
+
300: '#d4d4d8',
|
|
26
|
+
400: '#a1a1aa',
|
|
27
|
+
500: '#71717a',
|
|
28
|
+
600: '#52525b',
|
|
29
|
+
700: '#3f3f46',
|
|
30
|
+
800: '#27272a',
|
|
31
|
+
900: '#18181b',
|
|
32
|
+
950: '#09090b',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
fontFamily: {
|
|
36
|
+
sans: [
|
|
37
|
+
'Inter',
|
|
38
|
+
'ui-sans-serif',
|
|
39
|
+
'system-ui',
|
|
40
|
+
'-apple-system',
|
|
41
|
+
'BlinkMacSystemFont',
|
|
42
|
+
'Segoe UI',
|
|
43
|
+
'Roboto',
|
|
44
|
+
'Helvetica Neue',
|
|
45
|
+
'Arial',
|
|
46
|
+
'sans-serif',
|
|
47
|
+
],
|
|
48
|
+
mono: [
|
|
49
|
+
'JetBrains Mono',
|
|
50
|
+
'ui-monospace',
|
|
51
|
+
'SFMono-Regular',
|
|
52
|
+
'Menlo',
|
|
53
|
+
'Monaco',
|
|
54
|
+
'Consolas',
|
|
55
|
+
'monospace',
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
screens: {
|
|
59
|
+
xs: '475px',
|
|
60
|
+
},
|
|
61
|
+
animation: {
|
|
62
|
+
'fade-in': 'fadeIn 0.3s ease-out',
|
|
63
|
+
'slide-up': 'slideUp 0.3s ease-out',
|
|
64
|
+
'slide-down': 'slideDown 0.3s ease-out',
|
|
65
|
+
},
|
|
66
|
+
keyframes: {
|
|
67
|
+
fadeIn: {
|
|
68
|
+
'0%': {opacity: '0'},
|
|
69
|
+
'100%': {opacity: '1'},
|
|
70
|
+
},
|
|
71
|
+
slideUp: {
|
|
72
|
+
'0%': {opacity: '0', transform: 'translateY(10px)'},
|
|
73
|
+
'100%': {opacity: '1', transform: 'translateY(0)'},
|
|
74
|
+
},
|
|
75
|
+
slideDown: {
|
|
76
|
+
'0%': {opacity: '0', transform: 'translateY(-10px)'},
|
|
77
|
+
'100%': {opacity: '1', transform: 'translateY(0)'},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
|
|
83
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"include": [
|
|
3
|
+
"env.d.ts",
|
|
4
|
+
"app/**/*.ts",
|
|
5
|
+
"app/**/*.tsx",
|
|
6
|
+
"app/**/*.d.ts",
|
|
7
|
+
"*.ts",
|
|
8
|
+
"*.tsx",
|
|
9
|
+
"*.d.ts",
|
|
10
|
+
".graphqlrc.ts",
|
|
11
|
+
".react-router/types/**/*"
|
|
12
|
+
],
|
|
13
|
+
"exclude": ["node_modules", "dist", "build", "packages/**/dist/**/*"],
|
|
14
|
+
"compilerOptions": {
|
|
15
|
+
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
|
16
|
+
"isolatedModules": true,
|
|
17
|
+
"esModuleInterop": true,
|
|
18
|
+
"jsx": "react-jsx",
|
|
19
|
+
"moduleResolution": "Bundler",
|
|
20
|
+
"resolveJsonModule": true,
|
|
21
|
+
"module": "ES2022",
|
|
22
|
+
"target": "ES2022",
|
|
23
|
+
"allowJs": true,
|
|
24
|
+
"forceConsistentCasingInFileNames": true,
|
|
25
|
+
"skipLibCheck": true,
|
|
26
|
+
"baseUrl": ".",
|
|
27
|
+
"types": [
|
|
28
|
+
"@shopify/oxygen-workers-types",
|
|
29
|
+
"react-router",
|
|
30
|
+
"@shopify/hydrogen/react-router-types",
|
|
31
|
+
"vite/client"
|
|
32
|
+
],
|
|
33
|
+
"paths": {
|
|
34
|
+
"~/*": ["app/*"]
|
|
35
|
+
},
|
|
36
|
+
"noEmit": true,
|
|
37
|
+
"rootDirs": [".", "./.react-router/types"],
|
|
38
|
+
"incremental": true,
|
|
39
|
+
"composite": false,
|
|
40
|
+
"verbatimModuleSyntax": true,
|
|
41
|
+
|
|
42
|
+
/* Strict Type-Checking Options */
|
|
43
|
+
"strict": true,
|
|
44
|
+
"noImplicitAny": true,
|
|
45
|
+
"strictNullChecks": true,
|
|
46
|
+
"strictFunctionTypes": true,
|
|
47
|
+
"strictBindCallApply": true,
|
|
48
|
+
"strictPropertyInitialization": true,
|
|
49
|
+
"noImplicitThis": true,
|
|
50
|
+
"useUnknownInCatchVariables": true,
|
|
51
|
+
"alwaysStrict": true,
|
|
52
|
+
|
|
53
|
+
/* Additional Checks - relaxed for skeleton compatibility */
|
|
54
|
+
"noUnusedLocals": false,
|
|
55
|
+
"noUnusedParameters": false,
|
|
56
|
+
"noImplicitReturns": true,
|
|
57
|
+
"noFallthroughCasesInSwitch": true
|
|
58
|
+
|
|
59
|
+
/* These options are too strict for inherited skeleton code:
|
|
60
|
+
* "exactOptionalPropertyTypes": true,
|
|
61
|
+
* "noUncheckedIndexedAccess": true,
|
|
62
|
+
* "noImplicitOverride": true,
|
|
63
|
+
* "noPropertyAccessFromIndexSignature": true
|
|
64
|
+
* Enable them when cleaning up component code
|
|
65
|
+
*/
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {defineConfig} from 'vite';
|
|
2
|
+
import {hydrogen} from '@shopify/hydrogen/vite';
|
|
3
|
+
import {oxygen} from '@shopify/mini-oxygen/vite';
|
|
4
|
+
import {reactRouter} from '@react-router/dev/vite';
|
|
5
|
+
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [hydrogen(), oxygen(), reactRouter(), tsconfigPaths()],
|
|
9
|
+
build: {
|
|
10
|
+
// Allow a strict Content-Security-Policy
|
|
11
|
+
// withtout inlining assets as base64:
|
|
12
|
+
assetsInlineLimit: 0,
|
|
13
|
+
},
|
|
14
|
+
ssr: {
|
|
15
|
+
optimizeDeps: {
|
|
16
|
+
/**
|
|
17
|
+
* Include dependencies here if they throw CJS<>ESM errors.
|
|
18
|
+
* For example, for the following error:
|
|
19
|
+
*
|
|
20
|
+
* > ReferenceError: module is not defined
|
|
21
|
+
* > at /Users/.../node_modules/example-dep/index.js:1:1
|
|
22
|
+
*
|
|
23
|
+
* Include 'example-dep' in the array below.
|
|
24
|
+
* @see https://vitejs.dev/config/dep-optimization-options
|
|
25
|
+
*/
|
|
26
|
+
include: ['set-cookie-parser', 'cookie', 'react-router'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
server: {
|
|
30
|
+
allowedHosts: ['.tryhydrogen.dev'],
|
|
31
|
+
},
|
|
32
|
+
});
|