{"id":16338964,"url":"https://github.com/phadej/grunt-literate","last_synced_at":"2025-04-11T02:30:36.614Z","repository":{"id":11460764,"uuid":"13924319","full_name":"phadej/grunt-literate","owner":"phadej","description":"Generate docs from your source","archived":false,"fork":false,"pushed_at":"2016-02-21T03:32:44.000Z","size":276,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T07:51:09.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phadej.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-28T11:47:37.000Z","updated_at":"2014-05-08T07:15:40.000Z","dependencies_parsed_at":"2022-09-05T21:02:04.163Z","dependency_job_id":null,"html_url":"https://github.com/phadej/grunt-literate","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fgrunt-literate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fgrunt-literate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fgrunt-literate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phadej%2Fgrunt-literate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phadej","download_url":"https://codeload.github.com/phadej/grunt-literate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329500,"owners_count":21085543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T23:53:11.038Z","updated_at":"2025-04-11T02:30:36.316Z","avatar_url":"https://github.com/phadej.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-literate\n\n\u003e Generate docs from your source\n\n[![Build Status](https://travis-ci.org/phadej/grunt-literate.png)](https://travis-ci.org/phadej/grunt-literate)\n[![Code Climate](https://codeclimate.com/github/phadej/grunt-literate.png)](https://codeclimate.com/github/phadej/grunt-literate)\n[![NPM version](https://badge.fury.io/js/grunt-literate.png)](http://badge.fury.io/js/grunt-literate)\n[![Dependency Status](https://gemnasium.com/phadej/grunt-literate.png)](https://gemnasium.com/phadej/grunt-literate)\n\n## Getting Started\n\nThis plugin requires Grunt `~0.4.1`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before,\nbe sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide,\nas it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins.\n\nOnce you're familiar with that process, you may install this plugin with this command:\n\n```sh\nnpm install grunt-literate --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-literate');\n```\n\n## The \"literate\" task\n\nIn your project's Gruntfile, add a section named `literate` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  literate: {\n     \"README.md\": \"lib/foobar.js\"\n  }\n});\n```\n\nThe source will be parsed as JavaScript, and `/** ... ` comments extracted to the destination file.\nThis example uses markdown, but you are free to use any format, or even just plain text.\n\n### Options\n\n- `boolean code = false`, whether to include code parts or not\n\n### Directives\n\nComments starting with triple slash `///` are directive comments. Currently supported directives are:\n\n- `include` _filename_: include process _filename_ here.\n- `plain` _filename_: include _filename_ here, without any processing, as is.\n\n\n\n## beautiful-docs\n\nThis package plays well with [beautiful-docs](http://beautifuldocs.com/) and [grunt-beautiful-docs](https://www.npmjs.org/package/grunt-beautiful-docs) especially.\n\nIt's easy to start, you only need to configure `literate` and `bfdocs` tasks:\n\n```js\ngrunt.initConfig({\n  literate: {\n     \"README.md\": [\"lib/*.js\"]\n  },\n  bfdocs: {\n    docs: {\n      options: {\n        title: \"My fabulous documentation\",\n        manifest: {\n          files: [ \"README.md\" ],\n        },\n        dest: \"doc/\",\n        theme: \"default\",\n      }\n    }\n  },\n});\n```\n\nor check [`Gruntfile.js`](https://github.com/phadej/grunt-literate/blob/master/Gruntfile.js) in the repository for the real example.\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style.\nAdd unit tests for any new or changed functionality.\nLint and test your code using [Grunt](http://gruntjs.com/).\nMake a pull request, but don't commit `README.md`!\n\n## Release History\n\n- 0.2.0 Split out\n  - Library is in [ljs](https://github.com/phadej/ljs) package now\n- 0.1.5 Maintenance release\n  - Updated dependencies\n  - Added note about beautiful docs\n- 0.1.4 Usage as executable and library\n  - run `ljs`\n  - or `require(\"grunt-literate\")(filename)`\n  - also you may use glob patterns in directives\n- 0.1.3 Directives\n- 0.1.2 Newline improvements\n  - Newline at the end of comment\n  - Only one newline at the end of generated file\n- 0.1.1 Fix issue with unindenting\n- 0.1.0 Initial release\n\nCopyright Oleg Grenrus 2013\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n\n    * Redistributions in binary form must reproduce the above\n      copyright notice, this list of conditions and the following\n      disclaimer in the documentation and/or other materials provided\n      with the distribution.\n\n    * Neither the name of Oleg Grenrus nor the names of other\n      contributors may be used to endorse or promote products derived\n      from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphadej%2Fgrunt-literate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphadej%2Fgrunt-literate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphadej%2Fgrunt-literate/lists"}