Cookieplone make commands#
This reference guide describes the function and purpose of all the make commands found in a Cookieplone project.
It's organized according to its components.
Frontend
Backend
Documentation
Environment
Quality assurance (QA)
Internationalization (i18n)
Testing
Container images
Local stack
Acceptance
Frontend#
Note
In Classic UI projects, the frontend commands are not available.
When you issue a make command at the root of your project, you call the file Makefile also at the root.
In turn, it invokes commands in the file frontend/Makefile.
You can refer to these files for implementation details.
You can run the following make targets by using the command structure of make <TARGET>.
frontend-installInvokes the target
installinfrontend/Makefile. Usespnpm dlxto run mrs-developer to retrieve dependencies in the filefrontend/mrs.developer.json. It then installs the dependencies. Finally, it builds the dependency packages@plone/registryand@plone/componentsfrom source.frontend-buildInvokes the target
buildinfrontend/Makefile. This creates a production bundle for distribution of the project with the add-on.frontend-startInvokes the target
startinfrontend/Makefile. This starts Volto, allowing reloading of the add-on during development.frontend-testInvokes the target
testinfrontend/Makefile. This runs unit tests.
Backend#
When you issue a make command at the root of your project, you call the file Makefile also at the root.
In turn, it invokes commands in the file backend/Makefile.
You can refer to these files for implementation details.
You can run the following make targets by using the command structure of make <TARGET>.
backend-installInvokes the target
installinbackend/Makefile. This creates aPythonvirtual environment if one does not exist. It then installs Plone and its dependencies in that virtual environment. After installation, it runsmake backend-create-siteto initialize a new Plone site with default content.backend-buildInvokes the target
installinbackend/Makefile. This creates aPythonvirtual environment if one does not exist. It then installs Plone and its dependencies in that virtual environment. This is useful when you need to reload changes from your backend add-on, and don't need to recreate a full Plone site.backend-create-siteInvokes the target
create-siteinbackend/Makefile. This first ensures the virtual environment exists. Creates a new Plone site with default content.backend-update-example-contentInvokes the target
update-example-contentinbackend/Makefile. This first ensures the virtual environment exists. Next, it removes all content from the destination directory, if any content exists. Finally, it exports the Plone site content.backend-startInvokes the target
startinbackend/Makefile. This starts a Plone instance onlocalhost:8080.backend-testInvokes the target
testinbackend/Makefile. This runs unit tests.
Environment#
When you issue a make command at the root of your project, you call the file Makefile also at the root.
In turn, it invokes commands in the files backend/Makefile and frontend/Makefile.
You can refer to these files for implementation details.
You can run the following make targets by using the command structure of make <TARGET>.
installInvokes the target
backend-installandmake frontend-installinbackend/Makefileandfrontend/Makefilerespectively. This installs the add-ons in the development environment for both backend and frontend.cleanInvokes the target
cleanin bothbackend/Makefileandfrontend/Makefile. This command cleans both backend (removing virtual environments, cached files, and instance data) and frontend (removing core files and node_modules) environments.
Quality assurance (QA)#
When you issue a make command at the root of your project, you call the file Makefile also at the root.
In turn, it invokes commands in the files backend/Makefile and frontend/Makefile.
You can refer to these files for implementation details.
You can run the following make targets by using the command structure of make <TARGET>.
formatInvokes the target
formatin bothbackend/Makefileandfrontend/Makefile. This formats the code base according to Plone standards.lintInvokes the target
lintin bothbackend/Makefileandfrontend/Makefile. Checks for problems—such as linting, formatting, and style issues—but does not auto-fix them. It only reports errors.checkRuns both
formatandlintin sequence.
Internationalization (i18n)#
When you issue a make command at the root of your project, you call the file Makefile also at the root.
In turn, it invokes commands in the files backend/Makefile and frontend/Makefile.
You can refer to these files for implementation details.
You can run the following make targets by using the command structure of make <TARGET>.
i18nInvokes the target
i18nin bothbackend/Makefileandfrontend/Makefile. It updates translations in your project.
Testing#
When you issue a make command at the root of your project, you call the file Makefile also at the root.
In turn, it invokes commands in the files backend/Makefile and frontend/Makefile.
You can refer to these files for implementation details.
You can run the following make targets by using the command structure of make <TARGET>.
testInvokes the target
backend-testandmake frontend-testinbackend/Makefileandfrontend/Makefilerespectively. This runs unit tests in the project.
Container images#
When you issue a make command at the root of your project, you call the file Makefile also at the root.
In turn, it invokes commands in the files backend/Makefile and frontend/Makefile.
You can refer to these files for implementation details.
You can run the following make targets by using the command structure of make <TARGET>.
build-imagesInvokes the target
build-imagein bothbackend/Makefileandfrontend/Makefile. This builds Docker images for both backend and frontend.