Noitidart / ostypes

Submodule for Firefox addons that need js-ctypes to tap into platform (Windows, Mac, Linux/Unix) APIs
2 stars 4 forks source link

Add package.json file for easy installing via npm #10

Closed pdehaan closed 8 years ago

pdehaan commented 8 years ago

Fixes #9

Noitidart commented 8 years ago

Super cool thank you very much!

Noitidart commented 8 years ago

Do I have to npm publish now to get it onto npm?

Is it setup for use in an SDK addon though? (ostypes is not in CommonJS format) I tried once to use npm with Addon SDK (jpm) but couldn't figure it out.

pdehaan commented 8 years ago

Currently (now that you've merged into master), you can install it using npm or yarn using one of the following commands:

Both of those should add it to the GitHub URL to your local package.json devDependencies:

"ostypes": "github:noitidart/ostypes",

After that, you're pretty much on your own. You'd need to do some package.json postinstall script (or whatever) to move the files into ./lib/vendor, etc.

If you want to add this to npm so you can "optimize" to npm i ostypes -D and do versioning and all that jazz, you'd just have to sign into npm via CLI and do npm publish -- https://www.npmjs.com/package/ostypes has some pretty solid instructions since the package name is still available.

Noitidart commented 8 years ago

Thanks @pdehaan! If anything else is needed to make it easier for your side let me know please.

I'll look into that npm stuff and see how I can maintain it as a git submodule, as its used in a few projects already as git submodule.