move to script folder

This commit is contained in:
Tony Brix 2020-12-13 10:58:24 -06:00
parent 57cd9210b8
commit c3a9c21619
2 changed files with 7 additions and 4 deletions

View File

@ -48,7 +48,7 @@
"test:integration:local": "docker-compose up -d && npm run test:integration && docker-compose down",
"lint": "eslint . --fix",
"lint:ci": "eslint .",
"docs": "node build-docs.js"
"docs": "node scripts/build-docs.js"
},
"husky": {
"hooks": {

View File

@ -70,8 +70,8 @@ function createHTML (header, footer, text) {
}
async function createDocs () {
const docs = path.join(__dirname, 'docs')
const dist = path.join(__dirname, 'public')
const docs = path.resolve(__dirname, '..', 'docs')
const dist = path.resolve(__dirname, '..', 'public')
await fs.rmdir(dist, { recursive: true })
await fs.mkdir(dist)
@ -98,4 +98,7 @@ async function createDocs () {
await fs.copyFile(path.join(src, 'img', 'logo.svg'), path.join(dest, 'img', 'logo.svg'))
}
createDocs()
createDocs().catch(ex => {
console.error(ex)
process.exit(1)
})