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#
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-install
Invokes the target
install
infrontend/Makefile
. Usespnpm dlx
to run mrs-developer to retrieve dependencies in the filefrontend/mrs.developer.json
. It then installs the dependencies. Finally, it builds the dependency packages@plone/registry
and@plone/components
from source.frontend-build
Invokes the target
build
infrontend/Makefile
. This creates a production bundle for distribution of the project with the add-on.frontend-start
Invokes the target
start
infrontend/Makefile
. This starts Volto, allowing reloading of the add-on during development.frontend-test
Invokes the target
test
infrontend/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-install
Invokes the target
install
inbackend/Makefile
. This creates aPython
virtual environment if one does not exist. It then installs Plone and its dependencies in that virtual environment. After installation, it runsmake backend-create-site
to initialize a new Plone site with default content.backend-build
Invokes the target
install
inbackend/Makefile
. This creates aPython
virtual 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-site
Invokes the target
create-site
inbackend/Makefile
. This first ensures the virtual environment exists. Creates a new Plone site with default content.backend-update-example-content
Invokes the target
update-example-content
inbackend/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-start
Invokes the target
start
inbackend/Makefile
. This starts a Plone instance onlocalhost:8080
.backend-test
Invokes the target
test
inbackend/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>
.
install
Invokes the target
backend-install
andmake frontend-install
inbackend/Makefile
andfrontend/Makefile
respectively. This installs the add-ons in the development environment for both backend and frontend.clean
Invokes the target
clean
in bothbackend/Makefile
andfrontend/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>
.
format
Invokes the target
format
in bothbackend/Makefile
andfrontend/Makefile
. This formats the code base according to Plone standards.lint
Invokes the target
lint
in bothbackend/Makefile
andfrontend/Makefile
. Checks for problems—such as linting, formatting, and style issues—but does not auto-fix them. It only reports errors.check
Runs both
format
andlint
in 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>
.
i18n
Invokes the target
i18n
in bothbackend/Makefile
andfrontend/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>
.
test
Invokes the target
backend-test
andmake frontend-test
inbackend/Makefile
andfrontend/Makefile
respectively. 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-images
Invokes the target
build-image
in bothbackend/Makefile
andfrontend/Makefile
. This builds Docker images for both backend and frontend.