jonschlinkert / grunt-readme

DEPRECATED. Use Verb instead
https://github.com/assemble/verb
Other
30 stars 10 forks source link

the newest version 0.4.1 prompts template processing error #40

Closed qcgm1978 closed 10 years ago

qcgm1978 commented 10 years ago

Hello: I updated grunt-readme to the newest version 0.4.1 and it doesn't work with the following:

PS F:\PHPnow-1.5.6\htdocs\portal_new> grunt readme -g portalpc.coffee -s
Running "readme" task
Warning: An error occurred while processing a template (repos is not defined). Use --force to continue.
ReferenceError: An error occurred while processing a template (repos is not defined).
    at eval (/lodash/template/source[2]:28:9)
    at Function.template (F:\PHPnow-1.5.6\htdocs\portal_new\node_modules\grunt\node_modules\lodash\lodash.js:3879:14)
    at Object.template.process (F:\PHPnow-1.5.6\htdocs\portal_new\node_modules\grunt\lib\grunt\template.js:75:27)
    at Object.exports.compileTmpl (F:\PHPnow-1.5.6\htdocs\portal_new\node_modules\grunt-readme\tasks\lib\utils.js:98:31)

    at Object.<anonymous> (F:\PHPnow-1.5.6\htdocs\portal_new\node_modules\grunt-readme\tasks\readme.js:244:27)
    at Object.thisTask.fn (F:\PHPnow-1.5.6\htdocs\portal_new\node_modules\grunt\lib\grunt\task.js:78:16)
    at Object.<anonymous> (F:\PHPnow-1.5.6\htdocs\portal_new\node_modules\grunt\lib\util\task.js:282:30)
    at Task.runTaskFn (F:\PHPnow-1.5.6\htdocs\portal_new\node_modules\grunt\lib\util\task.js:235:24)
    at Task.<anonymous> (F:\PHPnow-1.5.6\htdocs\portal_new\node_modules\grunt\lib\util\task.js:281:12)
    at Task.start (F:\PHPnow-1.5.6\htdocs\portal_new\node_modules\grunt\lib\util\task.js:290:5)

Aborted due to warnings.

but 0.3.3v works.

Best Regards

jonschlinkert commented 10 years ago

Should be fixed: https://github.com/assemble/grunt-readme/commit/24678155e6777764405bb2b35fa8b796dc95ad00 Thanks for reporting this, let me know if you have any more issues.

qcgm1978 commented 10 years ago

It works now but why the overview.md's contents doesn't insert in readme.md. I added a overview.md in the 'node_modules\grunt-readme\docs' directory, and replace 'README.tmpl.md' contents including:

{%= _.doc("overview.md") %}
jonschlinkert commented 10 years ago

{%= _.doc("overview.md") %} is used for local templates, so overview.md should be in ./docs.

To use this file, you would use {%= _.include("docs-overview.md") %}

jonschlinkert commented 10 years ago

We're deprecating grunt-readme, please use Verb. thanks!