-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -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 | ||||||||||
|
||||||||||
`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 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
|
||||||||||
|
||||||||||
- Have a current version of Node.js installed. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
## Install | ||||||||||
|
||||||||||
- To install, run: `make install`. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
...and repeat down the file. |
||||||||||
|
||||||||||
- To run the demo server, do: `make serve`. | ||||||||||
|
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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
.