npx frontity create <project-name>and you'll get a project with the same structure as the one explained in this guide.
package.jsonfile where the dependencies needed for your app to work are declared.
frontity.settings.jsfile where the basic setup for your app is already populated.
frontity: this is the main package, where we can find all the methods we might need to use during development. It's also where the CLI lives.
@frontity/core: here is where the magic happens. Core takes care of all the bundling, rendering, merging, transpiling, serving, etc. We don't need to access to it in order to develop a Frontity app.
@frontity/wp-source: this package is the one that connects to the WordPress REST API of your site and fetches all the data needed on your Frontity theme.
@frontity/tiny-router: this is a small package that handles
window.historyand helps us with the routing on
@frontity/mars-theme: this is our starter theme, where we build our site with React.
mars-themedependency has no version but a path. This is how we need to add our custom packages (those we are developing inside the app) to our
package.jsonso they will be treated as if they were living in
mars-theme. Any changes done in these extensions during development will refresh our site automatically.
frontity, all the packages defined in
frontity.settings.jsare imported by
@frontity/file-settingsand the settings and exports from each package are merged by
@frontity/coreinto a single
storewhere you can access the
actionsof the different packages during development using
@frontity/connect(our state manager).