Skip to main content


LDkit - Linked Data query toolkit for TypeScript developers
Go to Latest
import { build, emptyDir } from "";
await emptyDir("./npm");
const exports = ["namespaces", "rdf", "sparql"];const dntExports = => ({ name: `./${e}`, path: `./${e}.ts`,}));
await build({ entryPoints: [ "./mod.ts", ...dntExports, ], outDir: "./npm", importMap: "./scripts/dnt_import_map.json", compilerOptions: { lib: ["es2021", "dom"], //target: "ES5", }, shims: { // see JS docs for overview and more options // deno: true, // undici: true, }, test: false, typeCheck: true, declaration: true, package: { // package.json properties name: "ldkit", version: Deno.args[0], description: "LDkit, a Linked Data query toolkit for TypeScript developers", homepage: "", author: "Karel Klima <> (", keywords: ["linked data", "rdf", "sparql", "deno"], license: "MIT", repository: { type: "git", url: "git+", }, bugs: { url: "", }, },});"Creating legacy node exports");for (const e of exports) { const packageContents = { main: `../script/${e}.js`, module: `../esm/${e}.js`, types: `../types/${e}.d.ts`, }; Deno.mkdirSync(`npm/${e}`); Deno.writeTextFileSync( `npm/${e}/package.json`, JSON.stringify(packageContents), );}"Done creating legacy node exports");
// post build stepsDeno.copyFileSync("LICENSE", "npm/LICENSE");Deno.copyFileSync("", "npm/");