Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit c3a9c21

Browse files
committed
move to script folder
1 parent 57cd921 commit c3a9c21

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"test:integration:local": "docker-compose up -d && npm run test:integration && docker-compose down",
4949
"lint": "eslint . --fix",
5050
"lint:ci": "eslint .",
51-
"docs": "node build-docs.js"
51+
"docs": "node scripts/build-docs.js"
5252
},
5353
"husky": {
5454
"hooks": {

build-docs.js renamed to scripts/build-docs.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ function createHTML (header, footer, text) {
7070
}
7171

7272
async function createDocs () {
73-
const docs = path.join(__dirname, 'docs')
74-
const dist = path.join(__dirname, 'public')
73+
const docs = path.resolve(__dirname, '..', 'docs')
74+
const dist = path.resolve(__dirname, '..', 'public')
7575

7676
await fs.rmdir(dist, { recursive: true })
7777
await fs.mkdir(dist)
@@ -98,4 +98,7 @@ async function createDocs () {
9898
await fs.copyFile(path.join(src, 'img', 'logo.svg'), path.join(dest, 'img', 'logo.svg'))
9999
}
100100

101-
createDocs()
101+
createDocs().catch(ex => {
102+
console.error(ex)
103+
process.exit(1)
104+
})

0 commit comments

Comments
 (0)