webgl-utils icon indicating copy to clipboard operation
webgl-utils copied to clipboard

Add a `package.json` so people can consume in Node projects

Open cvan opened this issue 9 years ago • 0 comments

I wouldn't change the code or directory structure at all. I would just suggest adding a package.json so folks can npm install https://github.com/toji/webgl-utils (or npm install brandons-webgl-utils if you eventually decide to publish to npm) to use the JS files in src/ in their own projects.

Down the road, you could create an entry-point file that exported an object containing all the modules in src. This would enable the utils to be easily consumed as CommonJS/AMD/UMD/window/ES6 modules. If using Browserify and Webpack, they handle all the exporting for you, as long as you include do module.exports = ….

cvan avatar Apr 04 '16 06:04 cvan