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

Implement pre-commit hook for generator #23

Open
Andy-set-studio opened this issue Dec 2, 2017 · 2 comments
Open

Implement pre-commit hook for generator #23

Andy-set-studio opened this issue Dec 2, 2017 · 2 comments

Comments

@Andy-set-studio
Copy link
Contributor

I’ve pulled this discussion here to keep things focused.

We discussed as part of the generator that converts “checklist.json” into “README.md” that we should make a pre-commit hook that would automatically run the generator for us. (See #1 & #22)

The script

I’ve already put a little idea together for the script, which I’ve already pasted into #1. Here it is for reference:

#!/bin/sh
# Check if this is the initial commit
if git rev-parse --verify HEAD >/dev/null 2>&1
then
node generator/index.js
git add README.md
exit 0
else 
exit 0

I guess we need to think of a solution that doesn’t over complicate things for a potential contributor.

@peter-mouland has already kicked the ideas off in #1 by suggesting husky

@Heydon
Copy link
Owner

Heydon commented Dec 28, 2017

@hankchizljaw I've compacted the reference links (also added a few more, but they don't all have one yet and only one has two.)

@Andy-set-studio
Copy link
Contributor Author

Yeh I spotted that. Looks good mate 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants