sloisel / numeric

Numerical analysis in Javascript
http://www.numericjs.com/
Other
1.42k stars 177 forks source link

Added package.json file for npm #2

Closed clayw closed 12 years ago

clayw commented 12 years ago

I have a package that uses some routines from this excellent library as a dependency and wanted to include it in the node package manager to properly automate everything.

sloisel commented 12 years ago

What's happened in the lib subdirectory?

clayw commented 12 years ago

npm wants the package.json to point to the entire compiled JS file located inside the repo

clayw commented 12 years ago

I just rewrote the utils I needed in my own repo so I don't need this as a dependency.... it would still be sweet to see it in the node package manager though. Would you like me to set that up and maintain it?

sloisel commented 12 years ago

Hi Clay,

Thanks for your comment. I apologize for not following-up on this, I was travelling and writing papers.

The way I've setup my repo is that the lib subdirectory is empty and the library gets built from the source in the src directory using the appropriate build scripts in the tools directory. The versioned libraries are never checked into github.

Similarly, the version number in the package.json file probably ought to be the result of the build scripts. However, I am not sufficiently knowledgeable in node to figure out these changes.

If you could educate me on how this package.json file works, it might be possible to do something.

For example, would it make sense to put a package.json in the src subdirectory that has "version": "XXX" and then get the XXX replaced by a build script using the appropriate version number?

More generally, it's not clear to me how this ties in with the npm "build" procedure.

Thanks,

Sébastien Loisel