-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
26 lines (20 loc) · 1006 Bytes
/
build.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import rdf from 'rdf-ext'
import checkDataset from './lib/checkDataset.js'
import fillContainer from './lib/fillContainer.js'
import loadDataset from './lib/loadDataset.js'
import * as ns from './lib/namespaces.js'
import writeDataset from './lib/writeDataset.js'
const config = {
baseIRI: 'https://housemd.rdf-ext.org/',
distPath: 'dist/housemd'
}
async function main () {
const dataset = await loadDataset({ baseIRI: config.baseIRI })
fillContainer({ container: rdf.namedNode(`${config.baseIRI}person/`), dataset, type: ns.schema.Person })
fillContainer({ container: rdf.namedNode(`${config.baseIRI}place/`), dataset, type: ns.schema.Place })
checkDataset({ baseIRI: config.baseIRI, dataset })
await writeDataset({ basePath: config.distPath, dataset, mediaType: 'application/n-quads' })
await writeDataset({ basePath: config.distPath, dataset, mediaType: 'application/n-triples' })
await writeDataset({ basePath: config.distPath, dataset, mediaType: 'text/javascript' })
}
main()