bililiteRange icon indicating copy to clipboard operation
bililiteRange copied to clipboard

feat(npm_nodejs): hacked in npm module support

Open DerekZiemba opened this issue 1 year ago • 0 comments

I wanted to be able to npm install [email protected]:DerekZiemba/bililiteRange.git#v5.0.0

So I hacked in module support, added a package.json, and changed the way it's built. It's quick & dirty, but could serve as a starting point if you were inclined to add npm support.

Other notable Changes:

  • Incremented version to 5.0.0
  • dist/bililiteRange.js now also includes bililiteRange.lines.js & jquery.sendkeys.js
  • dist/editor.js build step was removed (commented out) because it was sourcing files from other repos via webrequest & I don't intend to make those compatible.
  • My auto-linter did a number on it. Much of the ES3 code got converted to ES6
  • Added some basic typing via @jsdoc so intellisense works
  • Instead of simple concatenation & not wanting to introduce a dependency, I created module-support.js to mock nodejs's module.exports & require() mechanisms so types/Intellisense would work across files.
    • It's still fully web compatible as long as there isn't a module variable globally declared somewhere, in which case it would incorrectly export itself to an exports property on that object.

DerekZiemba avatar May 09 '24 17:05 DerekZiemba