Skip to content

Commit 9da0e15

Browse files
Merge pull request #23 from elsevierlabs-os/dev
Version 1.3.0 This PR migrates the RDF parsing and serialization from Oxigraph to the N3js library to support namespace prefixes, making the output more readable. The changes maintain the same functionality while switching the underlying library. Replaces Oxigraph RDF parsing/serialization with N3js library for better prefix support Updates build configuration to use webpack and esbuild with proper output paths Adds comprehensive namespace prefix definitions for common RDF vocabularies
2 parents 0acc002 + 3e20f86 commit 9da0e15

File tree

9 files changed

+2447
-2317
lines changed

9 files changed

+2447
-2317
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"request": "launch",
1111
"runtimeExecutable": "${execPath}",
1212
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
13+
"--extensionDevelopmentPath=${workspaceFolder}",
1414
],
1515
"outFiles": [
16-
"${workspaceFolder}/out/**/*.js"
16+
"${workspaceFolder}/dist/**/*.js"
1717
],
1818
"preLaunchTask": "npm: watch"
1919
}

esbuild.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
const esbuild = require('esbuild');
2+
3+
const production = process.argv.includes('--production');
4+
const watch = process.argv.includes('--watch');
5+
6+
async function main() {
7+
const ctx = await esbuild.context({
8+
entryPoints: ['src/extension.ts'],
9+
bundle: true,
10+
format: 'cjs',
11+
minify: production,
12+
sourcemap: !production,
13+
sourcesContent: false,
14+
platform: 'node',
15+
outfile: 'dist/extension.js',
16+
external: ['vscode'],
17+
logLevel: 'silent',
18+
plugins: [
19+
/* add to the end of plugins array */
20+
esbuildProblemMatcherPlugin
21+
]
22+
});
23+
if (watch) {
24+
await ctx.watch();
25+
} else {
26+
await ctx.rebuild();
27+
await ctx.dispose();
28+
}
29+
}
30+
31+
/**
32+
* @type {import('esbuild').Plugin}
33+
*/
34+
const esbuildProblemMatcherPlugin = {
35+
name: 'esbuild-problem-matcher',
36+
37+
setup(build) {
38+
build.onStart(() => {
39+
console.log('[watch] build started');
40+
});
41+
build.onEnd(result => {
42+
result.errors.forEach(({ text, location }) => {
43+
console.error(`✘ [ERROR] ${text}`);
44+
console.error(` ${location.file}:${location.line}:${location.column}:`);
45+
});
46+
console.log('[watch] build finished');
47+
});
48+
}
49+
};
50+
51+
main().catch(e => {
52+
console.error(e);
53+
process.exit(1);
54+
});

media/inspector.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)