I’m just beginning with sage, and i’m having trouble understanding a simple thing about deploying my theme via FTP. In the docs, it says once you compiled your assets for production, you just Upload all files and folders in your theme except the node_modules directory to your host.
My question is the following : in my folder, i have files like .editorconfig, .eslintrc.js, .git, .gitignore, package.json, package-lock.json, yarn.lock etc.
Do you also upload all these files ? As a newbie, it seems a little bit weird to import my .git for example… Sorry if my question sounds simple but again, i’m still learning development
no need to upload all file such as (node_module, .editorconfig, .eslintrc.js, .git, .gitignore, package.json, package-lock.json, yarn.lock) bcoz you have to create production build than only upload production then theme will work.
but if you want to edit theme or modify code on server then you have tu upload and setup everything. but I think it best way to just upload production build and in future anything need to modify then re upload production build.
Hey @vipul thanks for the answer! Well what do you call production build?
Before that i was using understrap, and i just ran a command that created a build folder with all the files (or a .zip). Right now when i’m looking at my folders after running ‘composer install --no-dev’, there are still a lot of files… how do i know which ones to upload and which ones aren’t needed ?
You don’t need to upload those, but uploading them won’t affect the operation of your site.
There isn’t a way to say conclusively what files should be uploaded because you can arrange files in your theme how you like: A good guideline is to ask whether a file is or could be called or executed when your theme is used. If so, upload that file. The files you mentioned are only used by the developer, they are never used by the theme, so they don’t need to be uploaded.
Generally “production build” refers to the results of running the asset build command, which you seem to already know about.