Docular core should not depend on grunt
bajtos opened this issue · 3 comments
We are using docular
to provide a CLI tool for generating and viewing angular documentation - see https://github.com/strongloop/loopback-sdk-angular-cli. I am trying to upgrade to our project from docular 0.6 to 0.8.
When I run docular.genDocs
, I get the following error:
Error: Cannot find module 'grunt'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/bajtos/src/loopback/angular-cli/node_modules/docular/lib/scripts/core/group.js:6:13)
See lib/scripts/core/group.js#L6.
Installing grunt
in my project fixed the problem.
I am asking you to rework group.js
so that it does not depend on grunt. IMO grunt.file.expand({cwd: process.cwd()}, groupData.files)
should be run inside the grunt plugin. Other callers may want to resolve the paths in a different way.
If that's not acceptable, then please at least add grunt
as a project dependency.
Version 0.8.3
seems to be the last version that still works, 0.8.4
is the first broken one.
Fixed in new version. Docular doesn't require grunt, plugins may require "glob" since it's lighter weight. grunt-docular pre-expands files so that we don't have compatibility layers as far outside of the core as possible.