-
Notifications
You must be signed in to change notification settings - Fork 66
Add support for npm install #454
Comments
I like the idea of making Roxy into an npm package, but the section of slushfile you are referring to only downloads the ml script. The ml new command in the runRoxy part after that will do a git clone to fetch full Roxy, and run the init command on it. Might be interesting though to consider reengineering ml new and ml upgrade to not use git, or allow npm as a fallback? |
I never noticed and used npm would provide a easier way to install and update Roxy. It will also help to integrate Roxy in Gulp scripts. |
I like |
Would make a lot of sense for RoxyJS if that ever sees life.. ;-) |
My group will have some interns this summer. I'm thinking about putting them to work on a Node-based RoxyJS using the Management API. |
Do you know if there are the plans to include management API methods / bindings with the official node client? |
From my sources, no concrete plans, but we're open to the official client expanding in that direction. Tickets for discussion would be good before PRs. |
My initial question was just about to ease Roxy install from gulp / javascript.
|
Thnx for sharing! |
Elegant way to download Roxy by the way, using the release zip, instead of using git clone. It does mean you cannot make use of the dev branch, which often has some nice new extras, but alas. I agree with Joe though, that it doesn't make too much sense to make an npm package of Roxy. But a Gem doesn't really make much sense either. Roxy is mostly a standalone app. I would see something in making an mlpm package out of it. @joemfb WDYT? And if you agree, what would we need to do to get this as a package into mlpm registry? |
I disagree; I think Roxy is or should be a command-line tool for managing apps. And since it's written in Ruby, I think it should be distributed as a gem. (Homebrew could also work, but then what about Windows: nuget?) That would mean that My view for mlpm is that it should manage packages that are to be evaluated within Marklogic. I think Marklogic-related tools should use language/environment specific distribution mechanisms (npm for js, Rubygems for ruby, pip for python, etc.). |
Makes sense. So not npm package, nor mlpm package. Still not sure about gem either though. A gem would make perfect sense if Roxy would be a library that you could 'require' from within a different Ruby project. But Roxy is a large mix of things. There is all kinds of stuff in there. And apart from all that, I see not a lot of gain in packaging Roxy to be honest. Just downloading the zip, or the ml script seems pretty straight-forward already to me.. Anyone else thoughts on this? |
Like npm packages, ruby gems aren't just for managing dependencies, but also distributing executables: |
I know, but still.. |
I did not say that Roxy should be published a npm package. I just suggested to add a |
Ah, and then just install directly from github! I like your approach of downloading the zip better I think. But if it really helps you... |
If package.json was available roxy could be installed like this: |
I'm only thinking, doing npm install would put all roxy files inside node_modules/roxy/, not directly helpful. On the other hand, we could perhaps add an ml.js, that should get linked as I also like to take a closer look at the gem stuff.. |
I came around this issue using Again my idea was to provide better integration with gulp and slush (I am not sure how gem will help in this use case). [1] - https://github.com/nativelogix/xquerrail2.framework/blob/master/gulpfile.js#L118 |
Would it make sense to create a different issue for gem? |
Yes, with low prio as nobody asked for it yet. :) |
Seems to work: Slush-marklogic-node downloads the ml-script, and lets ml new figure out itself how to get Roxy (e.g. by using git clone currently). Using ml new has the benefit it automatically cleans up and initializes the project along the way, so you get a much better starting point than by just cloning/copying Roxy.. |
I thinking about closing this ticket. Thoughts? |
Would it be possible to add
package.json
in the root project so Roxy could be installed from npm?MarkLogic Slush generator could then use it with gulp-install task and this code [2] would not be necessary.
[1] - https://docs.npmjs.com/cli/install
[2] - https://github.com/marklogic/slush-marklogic-node/blob/master/slushfile.js#L32-L66
The text was updated successfully, but these errors were encountered: