npx frontity create, we install three packages for you:
@frontity/tiny-routeras an external package. It ends up in the
@frontity/wp-sourceas an external package. It ends up in the
@frontity/mars-themeas a local package. It ends up in the
packagesit becomes a local package and you can change it at will. If you use
git, its code is also included in your project and you can commit any change. If you want to use that package in other projects or you want to contribute to the community, you can publish it to npm using
node_modulesbecause that folder is not committed to git and it is thrown away each time you move, reinstall or deploy your project.
package.json. When they are local, they are referenced by folder and when they are external, by the version number:
package.jsonfile. Its code is inside the
package.jsonfile is where you can write the info (name, description, author, repository, version...) of the package. It's just a regular
package.jsonfile, so nothing fancy here.
dependenciesfor the package. The
"dependencies"field gets automatically populated when you run
npm install some-npm-packagein the package folder.
/packagesfolder of your Frontity project:
my-themeis available in npm! Any other Frontity user can install it using:
themeor which one represents a
source. It treats all of them equally.