forked from act-rules/act-rules-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-node.js
21 lines (19 loc) · 884 Bytes
/
gatsby-node.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const { copy } = require('fs-extra')
const onCreateNode = require('./gatsby/on-create-node')
const createPages = require('./gatsby/create-pages')
// const createZip = require('./utils/create-zip')
exports.onPreBootstrap = async () => {
/**
* copy `testcases` and relevant `assets` to `public` directory (these are created via npm script `createTestcases`)
* Note:
* `gatsby build` cleans all `html` and `css` files within the destination directory, hence the need to copy these during `bootstrap` step
*/
await copy('./_data/testcases', 'public')
// await createZip('./_data/testcases', 'public/testcases.zip')
/**
* copy `earl-context.json` so it can be available in URL - `https://act-rules.github.io/earl-context.json`
*/
await copy('./build/earl-context.json', 'public/earl-context.json')
}
exports.onCreateNode = onCreateNode
exports.createPages = createPages