Skip to content

Commit

Permalink
Fix Makefile and README
Browse files Browse the repository at this point in the history
  • Loading branch information
ericof committed May 27, 2024
1 parent 1d36a31 commit 9f86fc0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 46 deletions.
22 changes: 8 additions & 14 deletions backend_addon/{{ cookiecutter.__folder_name }}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ GREEN=`tput setaf 2`
RESET=`tput sgr0`
YELLOW=`tput setaf 3`

PLONE6=6.0-latest

# Python checks
PYTHON?=python3

Expand Down Expand Up @@ -61,41 +59,37 @@ instance/etc/zope.ini: $(BIN_FOLDER)/pip ## Create instance configuration
config: instance/etc/zope.ini

.PHONY: build-dev
build-dev: config ## pip install Plone packages
build-dev: config ## Install Plone packages
@echo "$(GREEN)==> Setup Build$(RESET)"
$(BIN_FOLDER)/pipx run mxdev -c mx.ini
$(BIN_FOLDER)/uv pip install -r requirements-mxdev.txt

.PHONY: install
install: build-dev ## Install Plone 6.0
install: build-dev ## Install Plone

.PHONY: build
build: build-dev ## Install Plone 6.0
build: build-dev ## Install Plone

.PHONY: clean
clean: ## Remove old virtualenv and creates a new one
clean: ## Cleanup environment
@echo "$(RED)==> Cleaning environment and build$(RESET)"
rm -rf $(VENV_FOLDER) pyvenv.cfg .installed.cfg instance .tox .pytest_cache
rm -rf $(VENV_FOLDER) pyvenv.cfg .installed.cfg instance .tox .venv .pytest_cache

.PHONY: start
start: ## Start a Plone instance on localhost:8080
PYTHONWARNINGS=ignore $(BIN_FOLDER)/runwsgi instance/etc/zope.ini

.PHONY: console
console: instance/etc/zope.ini ## Start a zope console
console: instance/etc/zope.ini ## Start a console into a Plone instance
PYTHONWARNINGS=ignore $(BIN_FOLDER)/zconsole debug instance/etc/zope.conf

.PHONY: create-site
create-site: instance/etc/zope.ini ## Create a new site from scratch
PYTHONWARNINGS=ignore $(BIN_FOLDER)/zconsole run instance/etc/zope.conf ./scripts/create_site.py

.PHONY: format
format: $(BIN_FOLDER)/tox ## Format the codebase according to our standards
.PHONY: check
check: $(BIN_FOLDER)/tox ## Check (and fix) codebase according to our standards
@echo "$(GREEN)==> Format codebase$(RESET)"
$(BIN_FOLDER)/tox -e format

.PHONY: lint
lint: ## check code style
$(BIN_FOLDER)/tox -e lint

# i18n
Expand Down
8 changes: 1 addition & 7 deletions backend_addon/{{ cookiecutter.__folder_name }}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@

## Features

### Content Types

- TBD

### Initial content

This package contains a simple volto configuration.
TODO: List our awesome features

## Installation

Expand Down
2 changes: 1 addition & 1 deletion frontend_addon/{{ cookiecutter.__folder_name }}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ make install
Start the backend.

```shell
make start-backend-docker
make backend-start-docker
```

In a separate terminal session, start the frontend.
Expand Down
20 changes: 10 additions & 10 deletions project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
![GitHub](https://img.shields.io/github/license/plone/cookieplone-templates)
[![Black code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

# Cookieplone Plone Starter 🌟
# Cookieplone Plone Project 🌟

Welcome to **Cookieplone Plone Starter**! Your one-stop solution to kickstart [Plone](https://plone.org/) 6 projects with ease and efficiency. Powered by [cookieplone](https://github.com/plone/cookieplone) and [Cookiecutter](https://github.com/cookiecutter/cookiecutter), this template is designed to save you time and ensure that you get started on the right foot. 🚀
Welcome to **Cookieplone Plone Project**! Your one-stop solution to kickstart [Plone](https://plone.org/) 6 projects with ease and efficiency. Powered by [cookieplone](https://github.com/plone/cookieplone) and [Cookiecutter](https://github.com/cookiecutter/cookiecutter), this template is designed to save you time and ensure that you get started on the right foot. 🚀

## Features ✨

Expand Down Expand Up @@ -45,13 +45,13 @@ Cookieplone will ask a lot of questions.
You can use some of its options to avoid repeatedly entering the same values.


#### `--no-input`
#### `--no_input`

You can use the [`--no-input`](https://cookiecutter.readthedocs.io/en/latest/cli_options.html#cmdoption-cookiecutter-no-input) option to make the cookiecutter not prompt for parameters and only use `cookiecutter.json` file content.
You can use the [`--no_input`](https://cookiecutter.readthedocs.io/en/latest/cli_options.html#cmdoption-cookiecutter-no-input) option to make the cookieplone not prompt for parameters and only use `cookiecutter.json` file content.


#### `--replay` and `--replay-file`
You can use the options [`--replay`](https://cookiecutter.readthedocs.io/en/latest/cli_options.html#cmdoption-cookiecutter-replay) and [`--replay-file`](https://cookiecutter.readthedocs.io/en/latest/cli_options.html#cmdoption-cookiecutter-replay-file) to not prompt for parameters and only use information entered previously or from a specified file.
You can use the option [`--replay-file`](https://cookiecutter.readthedocs.io/en/latest/cli_options.html#cmdoption-cookiecutter-replay-file) to not prompt for parameters and only use information entered previously or from a specified file.
See [Replay Project Generation](https://cookiecutter.readthedocs.io/en/latest/advanced/replay.html) in the cookiecutter documentation for more information.

### Initial Build
Expand All @@ -65,21 +65,21 @@ make install
Backend:

```shell
make start-backend
make backend-start
```

Frontend:

```shell
make start-frontend
make frontend-start
```

### Rebuild After Changes

```shell
make build
make start-backend
make start-frontend
make install
make backend-start
make frontend-start
```

## Project Generation Options 🛠️
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ YELLOW=`tput setaf 3`
IMAGE_NAME_PREFIX={{ cookiecutter.__container_image_prefix }}
IMAGE_TAG=latest

PLONE6=6.0-latest

# Python checks
PYTHON?=python3

Expand Down Expand Up @@ -67,28 +65,28 @@ instance/etc/zope.ini: $(BIN_FOLDER)/pip ## Create instance configuration
config: instance/etc/zope.ini

.PHONY: build-dev
build-dev: config ## pip install Plone packages
build-dev: config ## Install Plone packages
@echo "$(GREEN)==> Setup Build$(RESET)"
$(BIN_FOLDER)/mxdev -c mx.ini
$(BIN_FOLDER)/uv pip install -r requirements-mxdev.txt

.PHONY: install
install: build-dev ## Install Plone 6.0
install: build-dev ## Install Plone

.PHONY: build
build: build-dev ## Install Plone 6.0
build: build-dev ## Install Plone

.PHONY: clean
clean: ## Remove old virtualenv and creates a new one
clean: ## Cleanup environment
@echo "$(RED)==> Cleaning environment and build$(RESET)"
rm -rf $(VENV_FOLDER) pyvenv.cfg .installed.cfg instance .tox .pytest_cache
rm -rf $(VENV_FOLDER) pyvenv.cfg .installed.cfg instance .tox .venv .pytest_cache

.PHONY: start
start: ## Start a Plone instance on localhost:8080
PYTHONWARNINGS=ignore $(BIN_FOLDER)/runwsgi instance/etc/zope.ini

.PHONY: console
console: instance/etc/zope.ini ## Start a zope console
console: instance/etc/zope.ini ## Start a console into a Plone instance
PYTHONWARNINGS=ignore $(BIN_FOLDER)/zconsole debug instance/etc/zope.conf

.PHONY: create-site
Expand All @@ -102,13 +100,9 @@ update-example-content: $(BIN_FOLDER)/tox ## Export example content inside packa
if [ -d $(EXAMPLE_CONTENT_FOLDER)/content ]; then rm -r $(EXAMPLE_CONTENT_FOLDER)/* ;fi
$(BIN_FOLDER)/plone-exporter instance/etc/zope.conf $(PLONE_SITE_ID) $(EXAMPLE_CONTENT_FOLDER)

.PHONY: format
format: $(BIN_FOLDER)/tox ## Format the codebase according to our standards
.PHONY: check
check: $(BIN_FOLDER)/tox ## Check (and fix) codebase according to our standards
@echo "$(GREEN)==> Format codebase$(RESET)"
$(BIN_FOLDER)/tox -e format

.PHONY: lint
lint: ## check code style
$(BIN_FOLDER)/tox -e lint

# i18n
Expand Down

0 comments on commit 9f86fc0

Please sign in to comment.