-
Notifications
You must be signed in to change notification settings - Fork 19
Setting Up a New Punchcard Repository
Scott Nath edited this page Sep 9, 2016
·
5 revisions
- Create a new repository in the Punchcard CMS Org
- Locally clone the new repo from the Punchcard Org and not your fork - you want the Punchcard CMS fork to be the canonical origin for now
- Create a .gitignore file
- Make sure it duplicates the .gitignore from the Punchcard CMS repo
- Set up an awesome new Node module using
npm init
- Make sure
punchcard-cms
is a keyword - Make sure license is
Apache-2.0
- Make sure an
https
URL is used for therepository
field - Make sure that
main
is set toindex.js
- Make sure
- Make a
.github
folder- Add templates from Punchcard
- Add a
CONTRIBUTING.md
file whose contents mimc the Punchcard Content Types contributing file
- Add an EditorConfig file in the root of the repository
- Set
root = true
- For all files (
[*]
), set the following:- Set
end_of_line = LF
- Set
indent_style = space
- Set
indent_size = 2
- Set
charset = utf-8
- Set
trim_trailing_whitespace = true
- Set
insert_final_newline = true
- Set
- Set
- Add an .nvmrc file in the root of the repository
- Set it to version
v5.11
- Set it to version
- Add Git Hooks to follow our commit conventions
- Run
npm i ghooks punchcard-commit-msg --save-dev
- Add
config.ghooks.commit-msg
topackage.json
and set it topunchcard-commit-msg
- This should now be in your
package.json
file:
"config": { "ghooks": { "commit-msg": "punchcard-commit-msg" } }
- Run
- Set up Semantic Release
- Follow general Semantic Release instructions
- Using
Travis CI
- Do not create a
.travis.yml
file (that'll happen later)- On the last question "What kind of
.travis.yml
do you want?", you should select "Create no.travis.yml
".
- On the last question "What kind of
- Using
- Run
npm i punchcard-semantic-release --save-dev
to install Punchcard's Semantic Release configuration- Add
release.analyzeCommits
topackage.json and set it to
punchcard-semantic-release/analyze` - Add
release. generateNotes
topackage.json and set it to
punchcard-semantic-release/notes ` - This should now be in your
package.json
file:
"release": { "analyzeCommits": "punchcard-semantic-release/analyze", "generateNotes": "punchcard-semantic-release/notes" }
- Add
- Follow general Semantic Release instructions
- Run
npm i ava tap-diff nyc coveralls eslint eslint-config-punchcard --save-dev
- Add ESLint Configuration files
-
.eslintrc.yml
should extendpunchcard
-
.eslintrc-ava.yml
should extendpunchcard/configurations/ava
- Add
scripts.lint
topackage.json
and set it toeslint index.js lib && eslint -c ./.eslintrc-ava.yml tests
- Add
scripts.ava
topackage.json
and set it toava | tap-diff
- Add
scripts.nyc
topackage.json
and set it tonyc --all npm run ava
- Add
scripts.pretest
topackage.json
and set it tonpm run lint
- Add
scripts.test
topackage.json
and set it tonpm run nyc
- Add
scripts.coverage
topackage.json
and set it tonyc report --reporter=text-lcov | coveralls
- Add
nyc.exclude
topackage.json
and set it to[ "tests/**/*" ]
- Add
ava.files
topackage.json
and set it to[ "tests/**/*.js" ]
- Add
ava.failFast
topackage.json
and set it totrue
- Add
ava.tap
topackage.json
and set it totrue
- Add
.travis.yml
file- Set
sudo
tofalse
- Set
language
tonode_js
- Set
node_js
to- '5.11'
- Set
cache.directories
to- node_modules
- Set
before_script
to- npm prune
- Set
after_success
to- npm run coverage
and- npm run semantic-release
- Set
branches.except
to/^v\d+\.\d+\.\d+$/
- Set
notifications.email
tofalse
- Set
- Run
greenkeeper enable
to set up Greenkeeper- *You must have
git remote origin
set to the canonical repository
- *You must have
- Go to Travis and make sure Travis is enabled for the repository
- Configure the Travis Slack integration using the "Encrypting your credentials" setup instructions
- Add relevant badges to README.md
- Set up Coveralls for Code Coverage
- Go to Coveralls and enable Coveralls for the repository
- You may need to sync your repos - check page for "JUST CREATED OR GOT ACCESS TO A NEW GIT REPO?" section
- Go to
/settings
for the repository in Coveralls- Disable
Leave Comments?
- Enable
Use Status API
- Ensure
Coverage Threshold for Failure
is blank - Set
Coverage Decrease Threshold for Failure
to3
- Configure the Incoming WebHooks integration to add Slack for Coveralls (
/notifications/slack_webhook
from project homepage on Coveralls)
- Disable
- Add relevant badges to README.md
- Go to Coveralls and enable Coveralls for the repository
- Set up Node Security for continuous security monitoring
- Go to Node Security and enable Node Security for the repository
- Add relevant badges to README.md
- Set up GitHub Protected Branches
- Travis and Coveralls will need to have run at least once before this step can be followed
- Go to
/settings/branches
for the repository - Enable
Protected branches
for themaster
branch- Enable
Protect this branch
- Enable `Required status checks to pass before merging
- Enable
Include administrators
- Enable
Require branches to be up to date before merging
- Enable
continuous-integration/travis-ci
andcoverage/coveralls
for required checks
- Enable
- Remote
origin
should be changed to your fork - Remote
upstream
should be the punchcard-cms fork
Working on Punchcard
Org Maintenance
Architecture Planning
These architectural discussions may be out-of-date given the current state of Punchcard.