Wednesday, February 1, 2017

Exposing N3 from a script tag in the browser

This seems to work thus far:

clone: https://github.com/RubenVerborgh/N3.js

Write some code that does this (save it to exportN3.js):

var N3 = require('./N3.js/N3.js');
exports.N3 = N3;

 Type this in the cli:

 browserify exportN3.js -s N3 -o bun2-exportN3.js

exportN3.js should be something that can be worked with





The two things to note are the exporting of the library, and the second is the generation of a Universal Module with the -s option

No comments:

Post a Comment