Skip to content

Commit

Permalink
Add readmes for public and app/assets directories
Browse files Browse the repository at this point in the history
  • Loading branch information
gfscott committed Apr 1, 2024
1 parent 140e476 commit 3935757
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/skeleton/app/assets/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Use the `/app/assets` folder to store static files that **should be processed at build time**.

Files in `/app/assets`:
- Get uploaded to the Shopify CDN on deployment
- `/app/assets/logo.png``cdn.shopify.com/0000/0000/0000/assets/logo.png`
- Can be imported in your app files
- Example: `import logo from '~/app/assets/logo.png'`
- Get processed by Hydrogen's build tools
- File names are likely to be hashed (`/app/assets/logo.svg` -> `/dist/assets/logo-p7f8c0gh.svg`)
- SVG images may be inlined
- CSS or JavaScript files may be chunked, uglified, and/or minified
Empty file removed templates/skeleton/public/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions templates/skeleton/public/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Use the `/public` folder to store static files that **shouldn't be processed at build time**.

Files in `/public`:
- Get uploaded to the Shopify CDN on deployment
- `/public/image.png``cdn.shopify.com/0000/0000/0000/image.png`
- Can't be imported in your app files (see `/app/assets` instead)
- Aren't processed by Hydrogen's build tools

0 comments on commit 3935757

Please sign in to comment.