Add a warning not to edit the README.md file directly (#968)

This commit is contained in:
Francis Gulotta 2016-10-19 09:58:02 -04:00 • committed by GitHub
parent a2395b4388
commit bd2ef3fbaa
4 changed files with 29 additions and 6 deletions

View file

@ -1,5 +1,7 @@
# Node Serialport
{{> edit-warning }}
[![npm](https://img.shields.io/npm/dm/serialport.svg?maxAge=2592000)](http://npmjs.com/package/serialport)
[![Gitter chat](https://badges.gitter.im/EmergingTechnologyAdvisors/node-serialport.svg)](https://gitter.im/EmergingTechnologyAdvisors/node-serialport)
[![Dependency Status](https://david-dm.org/EmergingTechnologyAdvisors/node-serialport.svg)](https://david-dm.org/EmergingTechnologyAdvisors/node-serialport)
@ -171,7 +173,7 @@ npm rebuild --build-from-source
#### Electron
Electron is a framework for creating cross-platform desktop applications. Electron comes with it's own version of the Node.js runtime.
Electron is a framework for creating cross-platform desktop applications. Electron comes with it's own version of the Node.js runtime.
If you require `serialport` as a depednancy for an Electron project you need to compile it for the version of Electron you're using in your project.
@ -349,4 +351,4 @@ $ serialport-term -h
$ serialport-term -l
/dev/cu.Bluetooth-Incoming-Port
/dev/cu.usbmodem1421 Arduino (www.arduino.cc)
```
```

10
.docs/edit-warning.hbs Normal file
View file

@ -0,0 +1,10 @@
<!-- STOP! WAIT! BEFORE YOU EDIT!
README.md is a generated file don't edit it!
This file is generated from .docs/README.hbs and the JavaScript files themselves.
See our contributing guide for more information.
https://github.com/EmergingTechnologyAdvisors/node-serialport/blob/master/CONTRIBUTING.md#writing-docs
-->

View file

@ -1,5 +1,16 @@
# Node Serialport
<!-- STOP! WAIT! BEFORE YOU EDIT!
README.md is a generated file don't edit it!
This file is generated from .docs/README.hbs and the JavaScript files themselves.
See our contributing guide for more information.
https://github.com/EmergingTechnologyAdvisors/node-serialport/blob/master/CONTRIBUTING.md#writing-docs
-->
[![npm](https://img.shields.io/npm/dm/serialport.svg?maxAge=2592000)](http://npmjs.com/package/serialport)
[![Gitter chat](https://badges.gitter.im/EmergingTechnologyAdvisors/node-serialport.svg)](https://gitter.im/EmergingTechnologyAdvisors/node-serialport)
[![Dependency Status](https://david-dm.org/EmergingTechnologyAdvisors/node-serialport.svg)](https://david-dm.org/EmergingTechnologyAdvisors/node-serialport)
@ -192,7 +203,7 @@ npm rebuild --build-from-source
#### Electron
Electron is a framework for creating cross-platform desktop applications. Electron comes with it's own version of the Node.js runtime.
Electron is a framework for creating cross-platform desktop applications. Electron comes with it's own version of the Node.js runtime.
If you require `serialport` as a depednancy for an Electron project you need to compile it for the version of Electron you're using in your project.
@ -736,4 +747,4 @@ $ serialport-term -h
$ serialport-term -l
/dev/cu.Bluetooth-Incoming-Port
/dev/cu.usbmodem1421 Arduino (www.arduino.cc)
```
```

View file

@ -90,8 +90,8 @@
},
"license": "MIT",
"scripts": {
"docs": "jsdoc2md -t .docs/README.hbs --partial .docs/sig-name.hbs --partial .docs/sig-link.hbs -r table --separators --name-format lib/* > README.md",
"docs:diff": "jsdoc2md -t .docs/README.hbs --partial .docs/sig-name.hbs --partial .docs/sig-link.hbs -r table --separators --name-format lib/* | diff README.md - || (echo 'Docs out of date, run `npm run docs` and commit the new README.md' && false)",
"docs": "jsdoc2md --no-cache -t .docs/README.hbs --partial .docs/sig-name.hbs --partial .docs/sig-link.hbs --partial .docs/edit-warning.hbs -r table --separators --name-format lib/* > README.md",
"docs:diff": "jsdoc2md --no-cache -t .docs/README.hbs --partial .docs/sig-name.hbs --partial .docs/sig-link.hbs --partial .docs/edit-warning.hbs -r table --separators --name-format lib/* | diff README.md - || (echo 'Docs out of date, run `npm run docs` and commit the new README.md' && false)",
"install": "node-pre-gyp install --fallback-to-build",
"rebuild-all": "npm rebuild && node-gyp rebuild",
"stress": "mocha --no-timeouts test/arduinoTest/stress.js",