diff --git a/csv2rdf/csv2rdf.ts b/csv2rdf/csv2rdf.ts index 244ceee..b16a093 100644 --- a/csv2rdf/csv2rdf.ts +++ b/csv2rdf/csv2rdf.ts @@ -181,8 +181,10 @@ export default class { writer.addQuads(this.store.getQuads(null, null, null, null)) writer.end((error, result) => { if(error) reject() - fs.writeFileSync(path, result) - resolve() + fs.writeFile(path, result, err => { + if(err) reject(err) + else resolve() + }) }) }) } diff --git a/csv2rdf/index.ts b/csv2rdf/index.ts index 3ecd416..dfbb3bf 100644 --- a/csv2rdf/index.ts +++ b/csv2rdf/index.ts @@ -15,8 +15,8 @@ const main = async () => { await schema.export('../virtuoso/data/toLoad/prism-schema.ttl') // webでホストする schema.ttl も更新 - if(fs.existsSync('../web/static/prism-schema.ttl')) fs.unlinkSync('../web/static/prism-schema.ttl') - await schema.export('../web/static/prism-schema.ttl') + if(fs.existsSync('../web/assets/prism-schema.ttl')) fs.unlinkSync('../web/assets/prism-schema.ttl') + await schema.export('../web/assets/prism-schema.ttl') // output.ttl(virtuosoにロードするデータ)を作成 const csv2rdf = new Csv2rdf() diff --git a/web/assets/.gitignore b/web/assets/.gitignore new file mode 100644 index 0000000..076510b --- /dev/null +++ b/web/assets/.gitignore @@ -0,0 +1 @@ +prism-schema.ttl