This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Description
Analogous to npm.
Motivation: make it easy to share REST API service extensions and transformations.
$ ml pm install tagger
- downloads the tagger extension, puts it into the rest/ext directory of the current Roxy project.
- downloads any dependent libraries, sets up the path under your src directory. Convention: src/lib/{extension-name}/{libraries}. enforced?
- downloading happens by "git clone" to a tmp directory, then files are moved to the appropriate locations.
- stores information about what was installed. where?
$ ml pm remove tagger
- lists files to be removed from the current Roxy project, prompts to confirm
$ ml pm publish tagger.xml
- sends tagger.xml to package registry (a public-facing web site hosted by MarkLogic registry.marklogic.com).
<package>
<extension>
<name>tagger</name>
<location>https://github.com/dmcassel/tagger</location>
<description>Takes parameters "uri", "tag", and "path". Inserts a &lt;tag&gt; element with the value of the tag parameter at the specified path.<description>
<works-with-ml>6</works-with-ml>
<license url="http://opensource.org/licenses/MIT">MIT</license>
</extension>
</package>
<package>
<transform>
<name>flatten-meta</name>
<location>https://github.com/dmcassel/flatten-meta</location>
<description>Converts elements of the form &amp;lt;meta name="foo" value="bar"/&gt; to &lt;foo&gt;bar&lt;/foo&gt;</description>
<works-with-ml>6</works-with-ml>
<works-with-ml>7</works-with-ml>
<license url="http://opensource.org/licenses/MIT">MIT</license>
</transform>
</package>
registry.marklogic.com would provide services to the "ml pm" command and allow for package browsing, like https://npmjs.org/.
This ticket lists first-cut functionality.