Re: [gentoo-dev] NPM / NodeJS project
On 06/28/2015 11:09 PM, Andrew Udvare wrote: I would still find it useful to install CoffeeScript (among others like PhantomJS) via Portage for global use. Right now I hack on ~/node_modules/.bin to PATH in my shell (luckily that works). It doesn't look like anyone wants to get involved with this until upstream settles down a bit, so I've committed dev-lang/coffee-script a few minutes ago sans-eclass.
Re: [gentoo-dev] NPM / NodeJS project
On Sun, 28 Jun 2015 12:30:25 -0400 Michael Orlitzky m...@gentoo.org wrote: I recently found a need for the CoffeeScript compiler[0] that runs on top of NodeJS. Its test suite requires a bunch of other javascript packages, and I wound up packaging enough of them to test CoffeeScript. In the process I wrote an eclass to handle packages hosted on the npm registry[1] and install them globally. I put all of this in an overlay for now: https://github.com/orlitzky/npm We don't have any standalone javascript packages in the tree at the moment but I know there's been some interest before. Is anyone still (planning on) working on javascript stuff in-tree? If not, I'll probably commit dev-lang/coffee-script to the tree without its test suite. But if so, the eclass and few dev-js packages I have might be a good start. Then I could add coffee-script with its test suite working. [0] http://coffeescript.org/ [1] https://www.npmjs.com/ Is this what I prompted about a year or more ago, and drew no interest in pursuing the npm path? I cited an eclass called npm.eclass in a dev's overlay. The conclusion was that using npm to install anything competed with portage at a level that made it a 'no go'. This came from members of the portage 'team'. It is a very awkward topic. -- kind regards Ian Delaney
Re: [gentoo-dev] NPM / NodeJS project
On 06/30/2015 03:56 AM, Ian Delaney wrote: Is this what I prompted about a year or more ago, and drew no interest in pursuing the npm path? I cited an eclass called npm.eclass in a dev's overlay. The conclusion was that using npm to install anything competed with portage at a level that made it a 'no go'. This came from members of the portage 'team'. It is a very awkward topic. No, but we may have wound up with a similar idea. I only became interested last week when somebody gave me a coffeescript program to deploy at work and there was no coffeescript. My eclass isn't using npm to do the actual install, since npm won't do a global install. I am using it as a lazy way to run the test suite (npm test), and I'm defaulting to npmjs.org as HOMEPAGE/SRC_URI because they have nice predictable URLs. But the src_install manually copies the javascript bits to a location where node can find them.
Re: [gentoo-dev] NPM / NodeJS project
FWIW, I also bumped into this in my previous job. I even wrote this (https://github.com/neurogeek/g-npm) which is incomplete but saved me a bunch of time creating a crazy amount of npm ebuilds. kinda rant My experience is, this isn't worth it. npm is a mess, is maintainer-unfriendly (although it might be argued that it is developer-friendly) and they basically don't care about about distributions at all. npm packages are not meant to be installed globally. They are content with having duplicate dependencies laying around everywhere. Their semantic versioning sucks. They 1.4.1.2 can break backwards compatibility with 1.4.1.1 and nobody cares. I didn't find a way to download specific versions, and had trouble when they did stuff like depend on 1.4.x, because of the above. Also, although minor point, the other reason I stopped pursuing this was because I think npm packages are needlessly small. So, you might want to install a package that depends on tens of other packages that depend on tens of packages themselves. Most of this packages are 10 lines of code. So, I ended up real fat with an dev-nodejs category with over a hundred packages. /kinda rant Having said all that, this was at least a couple of years ago. They might have come to their senses by now. Cheers, On Tue, Jun 30, 2015 at 10:06 AM, Michael Orlitzky m...@gentoo.org wrote: On 06/30/2015 03:56 AM, Ian Delaney wrote: Is this what I prompted about a year or more ago, and drew no interest in pursuing the npm path? I cited an eclass called npm.eclass in a dev's overlay. The conclusion was that using npm to install anything competed with portage at a level that made it a 'no go'. This came from members of the portage 'team'. It is a very awkward topic. No, but we may have wound up with a similar idea. I only became interested last week when somebody gave me a coffeescript program to deploy at work and there was no coffeescript. My eclass isn't using npm to do the actual install, since npm won't do a global install. I am using it as a lazy way to run the test suite (npm test), and I'm defaulting to npmjs.org as HOMEPAGE/SRC_URI because they have nice predictable URLs. But the src_install manually copies the javascript bits to a location where node can find them. -- Jesus Rivero (Neurogeek) Gentoo Developer
Re: [gentoo-dev] NPM / NodeJS project
On 2015-06-28, at 09:30, Michael Orlitzky m...@gentoo.org wrote: https://github.com/orlitzky/npm https://github.com/orlitzky/npmWe don't have any standalone javascript packages in the tree at the moment but I know there's been some interest before. Is anyone still (planning on) working on javascript stuff in-tree? Not in tree, but I was planning on an idea called enpm but I realised resolving dependencies in npm is horrible, almost as bad as the live code on building with Go. The only way I could see this work is to package the dependencies with the app in a single tarball similar to what Vagrant does now. It is not the Gentoo way but these new systems (gem, Composer, even Go) seem to not care very much about having packages you can consider stable, nor predictable dependencies. I would still find it useful to install CoffeeScript (among others like PhantomJS) via Portage for global use. Right now I hack on ~/node_modules/.bin to PATH in my shell (luckily that works).