It's a bit bound to nodejs's API. Originally I intended to make it portable to
the
browser but more and more use-cases came along and I never needed it in the browser
so the portability code bit-rotted and I eventually simplified it by marrying it to
node's CommonJS module system. That is not to say in the future parts couldn't be
ported to the browser.
As far as the .xar, indeed that is just the tip of the iceberg, there is XWikiDoc.js[1],
each of the XObject property types[2] (still missing a few) and a tool for parsing
an XClass XML representation seen in a XAR and generating a .js representation of
the class which can be used to generate an XObject[3].
Thanks,
Caleb
[1]:
Sounds good in general! Some thoughts…
Since these are tools about the XAR format I’d have expected to see XAR somewhere in the
name of the repo. Something like node-xar-tools.
Or maybe the XAR part is the tip of the iceberg and it’s really about a javascript
representation of the XWiki model, in which case I’d call it like javascript-xwikimodel.
Is node really the important part? Can the js code be used, say, inside XWiki, in a JSX?
Thanks
-Vincent
On 15 May 2014 at 16:20:17, Caleb James DeLisle (cjd@cjdns.fr(mailto:cjd@cjdns.fr))
wrote:
Hi,
xwiki-tools is a set of command line tools and a node.js library for building
and parsing parts of xwiki .xar files. It is unique in that it contains a
fairly complete model of XWiki documents, objects, and classes which is not
based on the original model in oldcore. It is capable of compiling a filesystem
representation of an xwiki extension such as:
https://github.com/xwiki-contrib/realtime-wysiwyg
into either a Maven compatible directory structure or a .xar file (which can
optionally be auto-posted up to the rest interface of a running wiki).
Until now I have never considered moving it into xwiki-contrib because it was
always "the ducttape I needed to make the real project I was doing
approachable"
but even if it does not enjoy API stability guarantees, it is useful even if
only as a tool for facilitating better thought about the XWiki model so I would
like to move it into xwiki-contrib repository and setup a bugtracker for it.
Unfortunately the name xwiki-tools which is quite descriptive in the npm
repository is not so helpful in xwiki-contrib so I would be willing to rename
it to node-xwikimodel (in npm it would be xwikimodel) and using a jira project
name NODEXWIKIMODEL.
WDYT?
The project:
https://www.npmjs.org/package/xwiki-tools
https://github.com/cjdelisle/xwiki-tools
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs