You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example src/audiolet/commonjs.js should be an entry point that exposes the API with module.exports, and you can build standalone versions (for plain browser-globals & requirejs) with npm run build.
If you don't want to go full-on into browserify, etc, support for CommonJS would still enable others who use it to use audiolet easier (and without adding script tags to html.)
if this is published to npm, users can do npm install audiolet to install in their project & use it like this:
varAudiolet=require('audiolet');
Since browserify will build versions for others (requirejs, browser-global) you don't have to manage concatenating the files & if the user uses a module system that avoids browser-globals, they won't be exposed.
Also, as a sidenote, this will add server-side node to your available deployment targets. sink,js already targets node server-side sound, so it should work pretty well, natively.
The real work is going through all the files and setting up the CommonJs dependencies in every file. I am happy to do this work, if all this sounds like a good idea.
The text was updated successfully, but these errors were encountered:
I've really not had much time to put into Audiolet for quite a while now, and it would be really nice to see it become a bit more modern looking. CommonJS and Node support would be pretty high on the list of priorities, so yeah, if you are up for doing the work I'll be happy to merge it. Hopefully it'll kick-start me to clean up some more rough edges and start doing a bit of work on this again!
I would like CommonJS support for using in browserify (and others,) which might help simplify the build process & better track dependencies, too.
Here is an example package.json file:
In this example src/audiolet/commonjs.js should be an entry point that exposes the API with
module.exports
, and you can build standalone versions (for plain browser-globals & requirejs) withnpm run build
.If you don't want to go full-on into browserify, etc, support for CommonJS would still enable others who use it to use audiolet easier (and without adding script tags to html.)
if this is published to npm, users can do
npm install audiolet
to install in their project & use it like this:Since browserify will build versions for others (requirejs, browser-global) you don't have to manage concatenating the files & if the user uses a module system that avoids browser-globals, they won't be exposed.
Also, as a sidenote, this will add server-side node to your available deployment targets. sink,js already targets node server-side sound, so it should work pretty well, natively.
The real work is going through all the files and setting up the CommonJs dependencies in every file. I am happy to do this work, if all this sounds like a good idea.
The text was updated successfully, but these errors were encountered: