-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix windows paths in development (#520)
* Fix more paths in Windows * Changeset * Fix build:pkg in Windows * Update changeset
- Loading branch information
Showing
6 changed files
with
39 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@shopify/create-hydrogen': patch | ||
'@shopify/cli-hydrogen': patch | ||
--- | ||
|
||
Fix pathnames on Windows when running the development server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import path from 'path'; | ||
import fs from 'fs/promises'; | ||
import {fileURLToPath} from 'url'; | ||
|
||
(async () => { | ||
const root = fileURLToPath(new URL('..', import.meta.url)); | ||
const hydrogenReact = 'node_modules/@shopify/hydrogen-react'; | ||
const hydrogenPkgDist = 'packages/hydrogen/dist'; | ||
const schemaFile = 'storefront.schema.json'; | ||
const typeFile = 'storefront-api-types.d.ts'; | ||
|
||
await fs.copyFile( | ||
path.resolve(root, hydrogenReact, schemaFile), | ||
|
||
path.resolve(root, hydrogenPkgDist, schemaFile), | ||
); | ||
|
||
await fs.copyFile( | ||
path.resolve(root, hydrogenReact, 'dist/types', typeFile), | ||
path.resolve(root, hydrogenPkgDist, typeFile), | ||
); | ||
})(); |