Skip to content

Commit 1e9e3af

Browse files
committed
Merge branch 'master' of https://github.com/h5bp/create-html5-boilerplate into lang
2 parents e14e1d4 + 6972646 commit 1e9e3af

File tree

3 files changed

+53
-16
lines changed

3 files changed

+53
-16
lines changed

.github/workflows/coveralls.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,38 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ master ]
8+
branches: [master]
99
pull_request:
10-
branches: [ master ]
10+
branches: [master]
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
strategy:
1817
matrix:
1918
node-version: [12.x]
2019

2120
steps:
22-
- uses: actions/checkout@v2
23-
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v1
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
- run: npm ci
28-
- run: npm run coverage
21+
- name: Get npm cache directory
22+
id: npm-cache
23+
run: |
24+
echo "::set-output name=dir::$(npm config get cache)"
25+
- uses: actions/cache@v2
26+
with:
27+
path: ${{ steps.npm-cache.outputs.dir }}
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-node-
31+
- uses: actions/checkout@v2
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v1
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
- run: npm ci
37+
- run: npm run coverage
2938

30-
- name: Coveralls
31-
uses: coverallsapp/github-action@master
32-
with:
33-
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
- name: Coveralls
40+
uses: coverallsapp/github-action@master
41+
with:
42+
github-token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"scripts": {
2121
"test": "jest",
2222
"format": "prettier --write \"./cli.js\" \"tests/*.js\"",
23-
"coverage": "jest --coverage --collectCoverageOnlyFrom ./lib/cli.js",
24-
"start": "node ./index.js ./out"
23+
"coverage": "jest --coverage --collectCoverageOnlyFrom ./lib/cli.js"
2524
},
2625
"files": [
2726
"lib/**/*",

0 commit comments

Comments
 (0)