UNPKG

4.07 kBMarkdownView Raw
1# gulp-format-md [![NPM version](https://img.shields.io/npm/v/gulp-format-md.svg?style=flat)](https://www.npmjs.com/package/gulp-format-md) [![NPM monthly downloads](https://img.shields.io/npm/dm/gulp-format-md.svg?style=flat)](https://npmjs.org/package/gulp-format-md) [![NPM total downloads](https://img.shields.io/npm/dt/gulp-format-md.svg?style=flat)](https://npmjs.org/package/gulp-format-md) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/gulp-format-md.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/gulp-format-md)
2
3> Gulp plugin for beautifying markdown using pretty-remarkable.
4
5Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
6
7## Install
8
9Install with [npm](https://www.npmjs.com/):
10
11```sh
12$ npm install --save gulp-format-md
13```
14
15See [release notes](#release-notes).
16
17## Usage
18
19```js
20const gulp = require('gulp');
21const format = require('gulp-format-md');
22
23gulp.task('format', () => {
24 return gulp.src('README.md')
25 .pipe(format())
26 .pipe(gulp.dest('.'));
27});
28```
29
30## Options
31
32### newline
33
34`gulp-format-md` ensures that files have a trailing newline by default. Pass `false` to disable this and strip trailing whitespace.
35
36**type**: `boolean`
37
38**default**: `true`
39
40**example**
41
42```js
43gulp.task('format-md', () => {
44 return gulp.src('readme.md')
45 .pipe(format({ newline: false }))
46 .pipe(gulp.dest('.'));
47});
48```
49
50## Release Notes
51
52### v2.0
53
54**Removed**
55
56CLI was removed in v2.0. We will be releasing a standalone CLI soon, please watch the project or follow [@jonschlinkert](https://github.com/jonschlinkert) for updates.
57
58## About
59
60<details>
61<summary><strong>Contributing</strong></summary>
62
63Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
64
65</details>
66
67<details>
68<summary><strong>Running Tests</strong></summary>
69
70Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
71
72```sh
73$ npm install && npm test
74```
75
76</details>
77
78<details>
79<summary><strong>Building docs</strong></summary>
80
81_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
82
83To generate the readme, run the following command:
84
85```sh
86$ npm install -g verbose/verb#dev verb-generate-readme && verb
87```
88
89</details>
90
91### Related projects
92
93You might also be interested in these projects:
94
95* [markdown-toc](https://www.npmjs.com/package/markdown-toc): Generate a markdown TOC (table of contents) with Remarkable. | [homepage](https://github.com/jonschlinkert/markdown-toc "Generate a markdown TOC (table of contents) with Remarkable.")
96* [pretty-remarkable](https://www.npmjs.com/package/pretty-remarkable): Plugin for prettifying markdown with Remarkable using custom renderer rules. | [homepage](https://github.com/jonschlinkert/pretty-remarkable "Plugin for prettifying markdown with Remarkable using custom renderer rules.")
97* [remarkable](https://www.npmjs.com/package/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://github.com/jonschlinkert/remarkable) | [homepage](https://github.com/jonschlinkert/remarkable "Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in one.")
98
99### Author
100
101**Jon Schlinkert**
102
103* [GitHub Profile](https://github.com/jonschlinkert)
104* [Twitter Profile](https://twitter.com/jonschlinkert)
105* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
106
107### License
108
109Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
110Released under the [MIT License](LICENSE).
111
112***
113
114_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 18, 2018._
\No newline at end of file