{"_id":"gulp-makdoc","_rev":"5-48b78e7a20a6e2368f54a19c35560c34","name":"gulp-makdoc","description":"A task library for generating documents","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"gulp-makdoc","version":"0.1.0","description":"A task library for generating documents","homepage":"https://github.com/pismute/gulp-makdoc","author":{"name":"Changwoo Park","email":"pismute@gmail.com","url":"https://pismute.github.com/"},"repository":{"type":"git","url":"git+https://github.com/pismute/gulp-makdoc.git"},"license":"MIT","main":"./index","keywords":["gulp","task","static","generator","handlebars","dashbars"],"dependencies":{"findup-sync":"^0.2.1","lodash":"^3.3.1"},"peerDependencies":{"run-sequence":"*","through2":"*","gulp":"*","gulp-cache":"*","gulp-cached":"*","gulp-connect":"*","gulp-filter":"*","gulp-load-plugins":"*","gulp-rename":"*","gulp-size":"*","gulp-using":"*","gulp-util":"*","del":"*","handlebars":"*","dashbars":"*","marked":"*","gulp-autoprefixer":"*","gulp-imagemin":"*","gulp-jshint":"*","gulp-less":"*","gulp-open":"*","gulp-sass":"*","pygmentize-bundled":"*"},"scripts":{"test":"gulp test"},"gitHead":"70fc4f9fbcc1dd8fc1f0b8a36b775cf49eb4ead3","bugs":{"url":"https://github.com/pismute/gulp-makdoc/issues"},"_id":"gulp-makdoc@0.1.0","_shasum":"6b92a0647fd17e78e5a93d23b6984f0efd13644a","_from":".","_npmVersion":"2.9.1","_nodeVersion":"1.7.1","_npmUser":{"name":"pismute","email":"pismute@gmail.com"},"maintainers":[{"name":"pismute","email":"pismute@gmail.com"}],"dist":{"shasum":"6b92a0647fd17e78e5a93d23b6984f0efd13644a","tarball":"https://registry.npmjs.org/gulp-makdoc/-/gulp-makdoc-0.1.0.tgz","integrity":"sha512-t/b2Iqg4MuDAei58zrXnVZL6OcYBcm2soMt2a/PC/Oh9EBFOt70gNVbP4KhI41As01GjqgG6dt7z2McAjlv+vw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpzeOGx40082t/5g8xX2fiM/epa2AmSvmzUdnpZB+1xAIgXZjAIv3shKwwyCMLHIvvBhWerEqSP2heBfp+OsflbiI="}]}},"0.2.0":{"name":"gulp-makdoc","version":"0.2.0","description":"A task library for generating documents","homepage":"https://github.com/pismute/gulp-makdoc","author":{"name":"Changwoo Park","email":"pismute@gmail.com","url":"https://pismute.github.com/"},"repository":{"type":"git","url":"git+https://github.com/pismute/gulp-makdoc.git"},"license":"MIT","main":"./index","keywords":["gulp","task","static","generator","handlebars","dashbars"],"dependencies":{"asciidoctor.js":"^1.5.2","dashbars":"^0.1.8","del":"1.2.0","glob":"^5.0.14","gulp-autoprefixer":"^2.3.1","gulp-babel":"^5.1.0","gulp-cache":"^0.2.10","gulp-connect":"^2.2.0","gulp-filter":"^2.0.2","gulp-imagemin":"^2.3.0","gulp-jshint":"^1.11.0","gulp-less":"^3.0.3","gulp-load-plugins":"^1.0.0-rc.1","gulp-open":"^0.3.2","gulp-rename":"^1.2.2","gulp-sass":"^2.0.1","gulp-size":"^1.2.2","gulp-sourcemaps":"^1.5.2","gulp-task-listing":"^1.0.1","gulp-uglify":"^1.2.0","gulp-using":"^0.0.1","gulp-util":"^3.0.5","highlight.js":"^8.6.0","lodash":"^3.3.1","marked":"^0.3.3","mime":"^1.3.4","minimatch":"^2.0.10","pygmentize-bundled-cached":"^1.1.0","run-sequence":"^1.1.1","through2":"^2.0.0"},"scripts":{"test":"gulp test"},"gitHead":"535d3454747f9fc84124d95e0f82a1ea733f4600","bugs":{"url":"https://github.com/pismute/gulp-makdoc/issues"},"_id":"gulp-makdoc@0.2.0","_shasum":"66f43a3f1a3a0a9217370e7dc313381f731cbd68","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"pismute","email":"pismute@gmail.com"},"maintainers":[{"name":"pismute","email":"pismute@gmail.com"}],"dist":{"shasum":"66f43a3f1a3a0a9217370e7dc313381f731cbd68","tarball":"https://registry.npmjs.org/gulp-makdoc/-/gulp-makdoc-0.2.0.tgz","integrity":"sha512-+BMAF02P4WcQ44IR/rb9UlwiWN6itojzURjwNtiy1I/GLx78ACj7H3efHnhwrAPJ5tnEtzBWWpUZjPDk9H6pbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWnMCxyMBLzfW9uSLgbBdVjelj+HU8BXjFCbACIYOEdAiEA5Lg3gllRm+gzXdjZXcmY3+YN3nSHVaXQEYck+fXGThw="}]}}},"readme":"#  [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-url]][daviddm-image]\n\n> A task library for generating documents\n\n## Install & Usage\n\n### Install\n\n```sh\n$ npm install --save-dev gulp-makdoc\n```\n\n### Usage\n\nRequire once anywhere:\n\n```js\nvar makdoc = require('gulp-makdoc');\n```\n\n`gulp-makdoc` has only peer dependencies so that you should check your dependencies.\n\nBuild:\n\n```sh\n$ gulp\n```\n\nServer:\n\n```sh\n$ gulp server\n```\n\nWatch:\n\n```sh\n$ gulp watch\n````\n\n#### Directory Layouts\n\n```\n.\n├── app/\n│   ├── layouts/\n│   │   └── **/*.hbs\n│   ├── partials/\n│   │   └── **/*.hbs\n│   ├── docs/\n│   │   └── **/*.html.md   // docs, markdown to html\n│   │   └── **/*.html.hbs // docs, handlebars to html\n│   └── root/\n│       ├── **/*.xml.hbs   // template, handlebars to xml\n│       └── **/*.html.hbs  // template, handlebars to html\n└── dist/ //target directory\n```\n\nYou can change directory layouts. Override `makdoc:init:after` task.\n\n```js\ngulp.task('makdoc:init:after', function(done){\n    var returns = function(v) {\n        return function(){\n            return v;\n        };\n    };\n\n    var vars = require('gulp-makdoc').vars;\n\n    var.DOCS = returns('app/docs/**/*.{md,hbs}');\n    var.TEMPLATES = returns(['app/root/**/*.hbs']);\n    var.PARTIALS = returns('app/partials/**/*.hbs');\n    var.LAYOUTS = returns('app/layouts/**/*.hbs');\n    var.IMAGES = returns([\n        'app/root/**/*.{ico,jpg,jpeg,png,gif}',\n        'app/docs/**/*.{ico,jpg,jpeg,png,gif}']);\n    var.STYLES = returns('app/root/**/*.{css,scss,less}');\n    var.SCRIPTS = returns('app/root/**/*.js');\n    var.DIST = returns('dist/');\n    var.BASE_URL = returns('http://localhost/');\n\n    done();\n});\n```\n\n## Deploy\n\nYou can define `deploy` task to easily deploy your documents:\n\n```js\ngulp.task('deploy', ['makdoc'], function () {\n    ...\n});\n```\n\nBefore documents are deploying, 'makdoc' task that build your documents should run. Make your documents fresh when you deploy\n\n### GitHub\n\nUsing [gulp-gh-pages][], You can easily deploy your site on GitHub page. Just install:\n\n```sh\n$ npm install --save-dev gulp-gh-pages\n```\n\nAs a usage for `gulp-gh-pages`:\n\n```js\ngulp.task('deploy', ['makdoc'], function () {\n    var deploy = require('gulp-gh-pages');\n    var path = require('path');\n\n    return gulp.src(path.join($.makdoc.vars.DIST(),'**/*'))\n        .pipe(deploy({\n            remoteUrl: 'git@github.com:pismute/pismute.github.io.git',\n            cacheDir: '.gh-pages',\n            branch:'master'\n        }));\n});\n```\n\n## Model\n\nMakdoc do not use such [YAML front matter][front-matter]. so we can write with any editor and format. you can write your documents in an editor like `vim` or `emacs`, And then build them using Makdoc to push on your website , or then print them to your printer or pdf file using your own tool like [Haroopad][] without touch.\n\n[front-matter]: http://jekyllrb.com/docs/frontmatter/\n[Haroopad]: http://pad.haroopress.com/\n\nInstead, Makdoc use `model.json` file. If the file name of your document is `path/to/my-doc.html.md` then make anther file of which the name is `path/to/my-doc.html.md.json`. Makdoc will load and merge it to the document model.\n\nHere are model overriding order in some way:\n\n1. Default model: Hard-coded model in Makdoc\n2. Extract `title` and `description` from content\n3. Directory model(`path/to/.model.json`)'s default(*)\n4. Directory model(`path/to/.model.json`)'s Individual.\n5. File model: `path/to/xxxx.json` file.\n6. Finalize model\n\n### Default Model\n\nMakdoc has four type components of documents:\n\n- Partials: `.hbs` templates that are partial documents in other `.hbs` documents.\n- Layouts: `.hbs` templates that contain other document.\n- Documents: `.md`, `.hbs`, and else documents that you write. Makdoc will decorate documents with Layouts, after Makdoc build them.\n- Templates: `.hbs` templates which is like `index.html`, `atom.xml`, `sitemap.xml`, and so on. Makdoc will decorate with Layouts\n\nMakdoc initializes different model for each type as default.\n\n##### Layouts, Partials\n\nLayouts and Partials has no a default model:\n\n```\n{}\n```\n\n##### Templates\n\nThe default model of templates is simple:\n\n```\n{\n    title: '',\n    date: new Date(),\n    description: '',\n    layout: 'default'\n    keywords: []\n}\n```\n\n##### Documents\n\nEvery document has 'untitled' title and 'documents' layout and now as date. Makdoc will sort documents in `docs` variable by date descending:\n\n```\n{\n    title: 'untitled',\n    date: new Date(),\n    description: '',\n    layout: 'documents'\n    keywords: []\n}\n```\n\n### Extract `title` and `description` from content\n\nMakdoc inject the title and description of documents from rendered content(html) to model. The title is a striped-string  from first line(newline ended, not `<br>`), and the description is a striped-string from the second or third nonempty(after striped and trimmed) line(it use the third line when the second line is empty):\n\n```\n<h1> This is title</h1>\n\n<p>This is description and\nthis is not description</p>\n```\n\n### Directory Model\n\nAn example represents layouts of directory and file models.\n\n```\npath/\n└── to/\n    ├── .model.json // A models for this directory, Directory model.\n    ├── document.html.md // A `.md` document\n    ├── document.html.md.json // A model for `.md` document, Document model\n    ├── document.html.hbs // A `.hbs` document\n    └── document.html.hbs.json // A model for `.hbs` document\n```\n\n`.model.json`:\n\n```\n{\n    `*`: //Directory Default Model\n    `document.html.md`: // Individual model.\n}\n```\n\n### File Model\n\n`path/to/document.html.md.json':\n\n```\n{\n    date: '2015-05-21',\n    keywords: ['new release', 'makdoc']\n}\n```\n\n### Model for SEO\n\n`title`, `description` and `keywords` of documents are useful for SEO. You can use it in your templates or layouts:\n\n```html\n<title>{{{title}}}</title>\n<meta name=\"description\"\n    content=\"{{{description}}}\"></meta>\n<meta name=\"keywords\"\n    content=\"{{{-join keywords ','}}}\"></meta>\n```\n\n## Tasks\n\nMakdoc tasks are like LEGO bricks for generating documents. You can just use because Makdoc has lots of combination tasks.\n\nyou can override some tasks if you want to change it differently:\n\n```js\n//after require('gulp-makdoc')\ngulp.task('makdoc:task', function(){\n    //...\n});\n```\n\nSome tasks like `server`, `watch`, `default`, `clean` is just a task that run other tasks in order or parallel. Therefore, you can override the behavior of Makdoc as complete as you want.\n\n### For user\n\nTasks lead you to get easy:\n\n- `default`: Just alias of 'makdoc'\n- `makdoc`: Build your documents.\n    1. 'makdoc:init'\n    2. 'makdoc:start'\n- `clean`: Clean all generated files and optimized-image caches.\n    1. 'makdoc:init'\n    2. ['makdoc:clean', 'makdoc:clear']\n- `server`: Build and run server\n    1. 'makdoc:init'\n    2. 'makdoc:server'\n    3. 'makdoc:start'\n    4. 'makdoc:open'\n- `watch`: Build and run and watch for live-reload\n    1. 'makdoc:init'\n    2. 'makdoc:server'\n    3. ['makdoc:start', 'makdoc:watch']\n    4. 'makdoc:open'\n- `makdoc:init:after`: An empty task to override that Makdoc will run it after initialized\n- `makdoc:done:after`: An empty task to override that Makdoc will run it after all done\n\n### For internal\n\n- `makdoc:start`: Start makdoc process\n    1. 'makdoc:prerequisite\n    2. 'makdoc:clean'\n    3. ['makdoc:resources', 'makdoc:build']\n    4. 'makdoc:done:after'\n- `makdoc:clean`: Clean files built from Makdoc.\n- `makdoc:clear`: Clear caches of [gulp-cache][], which of optimized images\n- `makdoc:build`: Build documents like Handlebars or Markdown\n    1. ['makdoc:partials', 'makdoc:layouts']\n    2. 'makdoc:docs'\n    3. 'makdoc:templates'\n- `makdoc:prerequisite`: Check condition.\n- `makdoc:init`: Initialize Makdoc\n    - 'makdoc:init:after'\n- `makdoc:partials`: Load partial Helpers for Handlebars.\n- `makdoc:layouts`: Load layouts that are Handlebars templates for decorating documents.\n- `makdoc:templates`: Build handlebars templates(var.TEMPLATES()).\n- `makdoc:docs`: Build var.DOCS().\n- `makdoc:resources`: Build and copy resources without templates\n    - 'makdoc:solid'\n    - 'makdoc:images'\n    - 'makdoc:styles'\n    - 'makdoc:scripts'\n- `makdoc:solid`: Copy files to dist directory.\n- `makdoc:images`: Optimize and Copy images(var.IMAGES()) to dist directory.\n- `makdoc:styles`: Build and Copy style files(var.STYLES()) to dist directory.\n- `makdoc:scripts`: Build script files to dist directory.\n- `makdoc:watch`: Watch files to run tasks\n- `makdoc:open`: Open browser to walk your documents\n- `makdoc:server`: Run server with live-reload.\n\n[gulp-gh-pages]: https://github.com/shinnn/gulp-gh-pages\n[gulp-cache]: https://github.com/jgable/gulp-cache\n\n## Links\n\n- A Blog from [@pismute](https://github.com/pismute/pismute.makdoc), Korean\n- A Blog from [@lethee](https://github.com/lethee/blog-by-makdoc), Korean\n- [Makdoc 소개](http://lethee.github.io/makdoc-first.html), Korean\n- [generator-makdoc-blog](https://github.com/lethee/generator-makdoc-blog): A Yeoman generator for blog\n\n## License\n\nMIT © [Changwoo Park](https://pismute.github.io/)\n\n[npm-url]: https://npmjs.org/package/gulp-makdoc\n[npm-image]: https://badge.fury.io/js/gulp-makdoc.svg\n[daviddm-url]: https://david-dm.org/pismute/gulp-makdoc.svg?theme=shields.io\n[daviddm-image]: https://david-dm.org/pismute/gulp-makdoc\n","maintainers":[{"name":"pismute","email":"pismute@gmail.com"}],"time":{"modified":"2022-06-18T17:29:32.610Z","created":"2015-05-23T03:02:48.405Z","0.1.0":"2015-05-23T03:02:48.405Z","0.2.0":"2015-09-09T12:44:23.358Z"},"homepage":"https://github.com/pismute/gulp-makdoc","keywords":["gulp","task","static","generator","handlebars","dashbars"],"repository":{"type":"git","url":"git+https://github.com/pismute/gulp-makdoc.git"},"author":{"name":"Changwoo Park","email":"pismute@gmail.com","url":"https://pismute.github.com/"},"bugs":{"url":"https://github.com/pismute/gulp-makdoc/issues"},"license":"MIT","readmeFilename":"README.md","users":{"rubiadias":true}}