danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 480 forks source link

Update drafter to drafter.js and other production packages. #347

Closed jtwebman closed 6 years ago

jtwebman commented 6 years ago

Using the full drafter means you have to compile the C++ all the time. We run micro services and this adds huge amounts of time to our build process. Not sure if you guys will take the change or not, let me know.

kylef commented 6 years ago

Aglio uses drafter-npm so that it will attempt to install the native module, however the native code is optional and if it fails to install it will use the JavaScript variant instead.

You can already disable the installation of the native module (Protagonist) by using npm install --no-optional. No optional argument will skip attempting to install Protagonist. This allows Aglio to retain support of both, so that if Protagonist is desired (for performance reasons, as it is faster) it can still be used.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 92.473% when pulling c2bee54da03125b5420b3646bde5fee54d30bf60 on jtwebman:switch-to-drifer-js into f4e14d7a73d4dacde1614eef2beb20354be78a24 on danielgtaylor:master.

jtwebman commented 6 years ago

npm install --no-optional doesn't work unless you are install the tool globally. If the tool is part of your package how do you tell it to not install optionals?

jtwebman commented 6 years ago

Seems like drafter should have used peer dependency and not install the C++ one but if your project had it installed used it.