Learn about how to structure your CMS React project.
Name | Type | Description |
---|---|---|
project-folder | Directory | Top-level directory that contains all other project files. This directory can have any name, but must contain hsproject.json . |
hsproject.json | File | The project’s configuration file. Must be at the root of the project in order for hs project upload to recognize your project. |
js-package | Directory | The directory that contains your React assets along with the cms-assets.json file. This directory can have any name. |
assets | Directory | The directory that contains supporting static assets, such as image files. Static assets with common extensions will resolve to public URLs automatically when used in modules. Learn more in Vite’s static asset documentation. |
components | Directory | The directory that contains the project’s islands and modules directories. |
islands | Directory | The directory that contains the project’s island files. Learn more about islands. |
modules | Directory | The directory that contains the project’s module directories and files. Learn more about modules. |
styles | Directory | The directory containing the project’s stylesheets. |
cms-assets.json | File | Must be contained within the JavaScript asset package subfolder in order for your React components to build properly. |
package.json | File | The file used for loading scripts and third-party dependencies. |
app
directory with the following structure:
hsproject.json
file must be in the root directory of your project folder for the CLI to recognize your project.
To build and deploy your project, run hs project upload
.
hs upload
instead.hs project deploy
command.
To turn off auto-deploy:
hs project open
to open the project settings page.hs project open
.hs project open
.