Skip to content

Commit 6972646

Browse files
authored
Merge pull request #21 from vltansky/readme-dev
docs: contributing
2 parents 0b00f9f + 5cba024 commit 6972646

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ These commands are equivalent and do the following:
4848
`create-html5-boilerplate` is cross-platform. It works wherever node and npm work.
4949
The only requirements are for `npx`, which requires npm version 5.2 or greater and
5050
`npm init` which requires an npm version greater than 6.0. If you're stuck on an
51-
older version of npm you can still use `create-html5-boilerplate` by running the
51+
older version of npm you can still use `create-html5-boilerplate` by running the
5252
following command to install the project globally.
5353

5454
```
@@ -74,3 +74,32 @@ cd new-site
7474
npm install
7575
npm start
7676
```
77+
78+
## CONTRIBUTING
79+
80+
### Setting Up a Local Copy
81+
82+
1. Clone the repo with `git clone https://github.com/h5bp/create-html5-boilerplate.git`
83+
2. Run `npm install` in the root `create-html5-boilerplate` folder.
84+
3. Run `npm link` to make npm run local copy instead of downloading from registry
85+
4. Now you can use `npm init html5-boilerplate` and `npx create-html5-boilerplate`
86+
87+
note: you can use `npx create-html5-boilerplate ./out/example` from `create-html5-boilerplate` without running `npm link`
88+
also its possible to run directly NodeJS entry point `node index.js ./out/example` or `npm start`
89+
`./out` is git ignored folder, so you should use this folder for tests.
90+
91+
If you want to try out the end-to-end flow with the global CLI, you can do this too:
92+
93+
```
94+
npx create-html5-boilerplate ./out/new-site
95+
cd new-site
96+
npm install
97+
npm start
98+
```
99+
100+
### Tests
101+
102+
Tests are written using [jest](https://jestjs.io/) and located in `tests/test.js`
103+
run `npm test`
104+
105+
run coverage reports `npm run coverage`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"test": "jest",
2222
"format": "prettier --write \"./cli.js\" \"tests/*.js\"",
2323
"coverage": "jest --coverage --collectCoverageOnlyFrom ./cli.js",
24-
"start": "node ./index.js ./out"
24+
"start": "node ./index.js ./out/example"
2525
},
2626
"files": [
2727
"license.txt",

0 commit comments

Comments
 (0)