Skip to content
This repository has been archived by the owner on May 1, 2022. It is now read-only.

Use /public directory for static assets instead of copying from /src #65

Merged
merged 18 commits into from
Mar 18, 2020

Conversation

jacobdeichert
Copy link
Owner

@jacobdeichert jacobdeichert commented Mar 17, 2020

Which issue does this fix?

Closes #64

Describe the solution

🚨 BREAKING CHANGE 🚨

Svelvet will no longer copy all assets from ./src to ./dist. Instead, svelvet will rely on a ./public directory existing for all non-js/svelte files to live in. The dist build directory will now live inside ./public/dist instead.

Directory Breakdown:

  • ./src/ - svelvet looks for and compiles svelte files & copies js files to ./public/dist/
  • ./public/ - all your static public assets that will be served/deployed
  • ./public/dist/ - svelvet's build directory

Why?

Copying all static files from src to dist for every build is just really inefficient. A static public directory makes sense here - no more copying of files and YOU get to choose which files you want public. For example, if you store your tailwind css files inside src, they will not get copied to public BUT this allows you to compile with tailwind separately into public as desired.

TODO

  • update README documentation
  • add migration guide

@jacobdeichert jacobdeichert merged commit 863eb6b into master Mar 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow excluding certain files
1 participant