Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add prerequisite pre-commit #1426

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,32 @@ There are several options to integrate Mockup.
<script src="https://cdn.jsdelivr.net/npm/@plone/mockup@latest/dist/bundle.min.js"></script>
```

## Prerequisites

## Install
Prepare your system by installing prerequisites.

### pre-commit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a big fan of not copy-pasting docs, and instead referring to an authoritative source that is actively maintained. This reduces maintenance burden, but you would have to trust that the authoritative source will be around. In this case, I don't see plone.api going away anytime soon. See subsequent comment for an example of what I mean.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per discussion in Discord, pre-commit is not necessary after all, but I still like a Prerequisites section for the rest of the stuff.

Sorry for the noise. At least you have it installed on your system for when other Plone projects require it, which is quite a few due to plone/meta.

`mockup` uses [pre-commit](https://pre-commit.com/) to automate code quality checks before every commit.

Install pre-commit either with your system package manager.
Alternatively you can install pre-commit into your Python user.

```shell
python -m pip install --user pre-commit
```

Once installed, set up the git hook scripts to run on every commit.

```shell
pre-commit install
```
### Node.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some breathing room to see it's a new section.

Suggested change
### Node.js
### Node.js


- Have a current version of Node.js installed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Have a current version of Node.js installed.
Have a current version of Node.js installed.
See [Plone 6 Documentation](https://6.docs.plone.org/install/create-project-cookieplone.html#nvm) for installing nvm to manage versions of Node.js.


## Install

- To install, run: `make install`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this is a section instead of a wall of text, I don't think bullet points are necessary. Your call.

Suggested change
- To install, run: `make install`.
To install, run: `make install`.

...and repeat down the file.


- To run the demo server, do: `make serve`.
Expand Down