asciidoctor / asciidoctor.js

:scroll: A JavaScript port of Asciidoctor, a modern implementation of AsciiDoc
https://asciidoctor.org
MIT License
739 stars 136 forks source link

Publish to npm #4

Closed balupton closed 10 years ago

balupton commented 11 years ago

Would be great if you published this to npm. That way we could use this to accomplish bevry/docpad#599

mojavelinux commented 11 years ago

:+1:

Here's a how-to guide:

https://gist.github.com/coolaj86/1318304

I did this once locally, so I have a package spec lying around. Here it is:

{
  "bugs": {
    "url": "https://github.com/asciidoctor/asciidoctor.js/issues"
  }, 
  "engines": {
    "node": "*"
  }, 
  "name": "asciidoctor.js", 
  "contributors": [
    {
      "name": "Guillaume Grossetie", 
      "email": "ggrossetie@gmail.com"
    }
  ], 
  "version": "0.1.2", 
  "licenses": [
    {
      "type": "MIT"
    }
  ], 
  "keywords": [
    "markup", 
    "processor", 
    "asciidoc"
  ], 
  "description": "AsciiDoc markup language processor", 
  "repository": {
    "type": "git", 
    "url": "git://github.com/asciidoctor/asciidoctor.js.git"
  }, 
  "author": {
    "name": "Dan Allen", 
    "email": "dan.j.allen@gmail.com"
  }, 
  "homepage": "http://asciidoctor.org", 
  "scripts": {},
  "main": "./asciidoctor.js"
}
mojavelinux commented 10 years ago

We'll get this done as soon as we cut a release (or a preview release) based on 1.5.0.

bleathem commented 10 years ago

This is also a requirement for integrating asciidotor.js with assemble.io.

I am by no means a node expert, but from what I looked at w.r.t. creating a node module, more is required than simply defining the package.json. For instance the Opal.Asciidoctor global will have to be shared via the node exports [1].

Also, if we include the Opal global here, we could conceivably conflict with other Opal'ified libraries. There is a Opal npm module, but it seems out-of-date [2].

[1] http://howtonode.org/creating-custom-modules [2] https://npmjs.org/package/opal

anthonny commented 10 years ago

I have just published 2 wrappers for Opal and Asciidoctor.js :

https://www.npmjs.org/package/opal-npm-wrapper https://www.npmjs.org/package/asciidoctorjs-npm-wrapper

Feedback are welcome

mojavelinux commented 10 years ago

Resolved by @anthonny. Great work!

https://www.npmjs.org/package/asciidoctor.js

anthonny commented 10 years ago

Done for 1.5.0 ;)

mojavelinux commented 10 years ago

\o/