Skip to content

Commit 6978e80

Browse files
committed
Merge branch 'main' of https://github.com/h5bp/create-html5-boilerplate into dev/vlad/refactor-module
2 parents 88506be + 6d3610f commit 6978e80

File tree

8 files changed

+12186
-2278
lines changed

8 files changed

+12186
-2278
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
pull_request:
77
# The branches below must be a subset of the branches above
8-
branches: [master]
8+
branches: [main]
99
schedule:
1010
- cron: '0 22 * * 3'
1111

@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
2929
with:
3030
# We must fetch at least the immediate parents so that if this is
3131
# a pull request then we can checkout the head.

.github/workflows/coveralls.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ name: Tests and coverage
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
pull_request:
7-
branches: [master]
7+
branches: [main]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [12.x, 14.x, 15.x]
14+
node-version: [14.x, 16.x]
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v2
18+
uses: actions/setup-node@v3
1919
with:
2020
node-version: ${{ matrix.node-version }}
2121
- name: Install dependencies

.github/workflows/lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Eslint
55

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

1212
jobs:
1313
build:
@@ -24,10 +24,10 @@ jobs:
2424
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2525
restore-keys: |
2626
${{ runner.os }}-node-
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2828
- name: Use Node.js ${{ matrix.node-version }}
29-
uses: actions/setup-node@v1
29+
uses: actions/setup-node@v3
3030
with:
31-
node-version: "14.x"
31+
node-version: "16.x"
3232
- run: npm ci
3333
- run: npm run lint

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Release
55
on:
66
push:
77
branches:
8-
- master
8+
- main
99
- next
1010
jobs:
1111
release:
@@ -21,9 +21,9 @@ jobs:
2121
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2222
restore-keys: |
2323
${{ runner.os }}-node-
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525
- name: Setup Node.js
26-
uses: actions/setup-node@v2
26+
uses: actions/setup-node@v3
2727
with:
2828
node-version: 'lts/*'
2929

lib/cli.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,12 @@ export default async function CreateHtml5BoilerplateCLI(argvs) {
128128
});
129129
const timer = elapsed.start();
130130
const version = (argv.release || "latest").toString();
131-
const targetDir = path.resolve(argv._[0] || "./");
131+
const targetDir = path.resolve(process.cwd(), argv._[0] || "./");
132132
const override = await checkFolder(targetDir, argv);
133+
if (targetDir === "./") {
134+
console.log(targetDir);
135+
process.exit(0);
136+
}
133137
if (!override) {
134138
console.log(chalk.red("Aborted"));
135139
return;
@@ -146,6 +150,7 @@ export default async function CreateHtml5BoilerplateCLI(argvs) {
146150
);
147151
await fs.copy(`${tempDir}/dist`, targetDir);
148152
const timerDownloaded = timer.get();
153+
console.log(targetDir);
149154
await onLoad(targetDir, version, argv);
150155
spinner.succeed(
151156
` ${nameWithVersion} copied to ${targetDir} in ${timerDownloaded}. Have fun!`

0 commit comments

Comments
 (0)