frontity
and @frontity/core
These packages contain the core of Frontity and need to be installed in any Frontity project.@frontity/wp-source
, @frontity/tiny-router
or @frontity/my-theme
These are similar to WordPress theme and plugins. You can change them if you want, add more, create new ones...npm install the-package-name
. Don't worry, if you have used npx frontity create
, the core packages were already installed for you.frontity.settings.js
. We'll talk about the settings in detail in the next section.frontity.setting.js
filenpx frontity create
to start a new project, but Frontity is really versatile, and there are many options. You can check them out at the Settings page, explained in detail later./node_modules/
folder@frontity/core
) is installed there. If you install other Frontity packages like @frontity/tiny-router
or @frontity/wp-source
they will be there as well./packages/
folder. The code won't be update when inside this directory./packages/
foldernode_modules
folder to adapt their code, and the custom packages you create. They are core in Frontity, so they are explained in detail later at Packages.package.json
filefrontity
: 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 it in order to develop a Frontity app.@frontity/wp-source
: this package is the one that connects to the WordPress REST API for your site and fetches all the data needed for your Frontity theme. If you are using a different Source than WordPress, you will want to change this.@frontity/tiny-router
: this is a small package that handles window.history
and helps us with the routing. You can also use a different Router.@frontity/mars-theme
: this is our starter theme, where we build our site with React, but you could install a different one.mars-theme
dependency has no version but a path. This is how we need to add our local packages to our package.json
so they will be treated as if they were living in node_modules
.