Skip to content

Commit

Permalink
doc: update layout and homepage (#1737)
Browse files Browse the repository at this point in the history
* doc: update layout and homepage

This adds some usage examples and general info of why you'd use serialport to the homepage.

I also combined the guides and docs sections so it's easier to find information.

* Update packages/website/static/css/custom.css

Co-Authored-By: reconbot <wizard@roborooter.com>
  • Loading branch information
reconbot committed Dec 6, 2018
1 parent 7cfadf5 commit d78ea84
Show file tree
Hide file tree
Showing 27 changed files with 606 additions and 475 deletions.
39 changes: 0 additions & 39 deletions docs/api-overview.md

This file was deleted.

41 changes: 39 additions & 2 deletions docs/guide-about.md
Expand Up @@ -4,8 +4,8 @@ title: About SerialPort
---

## Quick Answers to Important Questions
- **For support**, open a [GitHub issue](https://github.com/node-serialport/node-serialport/issues/new).
- **To contribute**, please review our [contribution guide](https://github.com/node-serialport/node-serialport/blob/master/CONTRIBUTING.md) and [Code of Conduct](code-of-conduct.md). We also have issues tagged ["good first PR"](https://github.com/node-serialport/node-serialport/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22), if you'd like to start somewhere specific. We'll do our best to support you until we merge your PR.
- **For support**, open a [GitHub issue](https://github.com/node-serialport/node-serialport/issues/new/choose).
- **To contribute**, please review our [contribution guide](https://github.com/node-serialport/node-serialport/blob/master/CONTRIBUTING.md) and [Code of Conduct](code-of-conduct). We also have issues tagged ["good first PR"](https://github.com/node-serialport/node-serialport/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22), if you'd like to start somewhere specific. We'll do our best to support you until we merge your PR.

***
## Helpful Resources for Getting Started with Node-Serialport
Expand All @@ -15,6 +15,43 @@ In addition to reading the [article mentioned above](http://www.voodootikigod.co
* [Arduino Node Security Sensor Hacking](http://nexxylove.tumblr.com/post/20159263403/arduino-node-security-sensor-hacking): A great all-around "how do I use this" article.


## Packages
Chances are you're looking for the [`serialport`](api-serialport.md) package which provides a good set of defaults for most projects. However it is quite easy to mix and match the parts of serialport you need.

### Bindings
The Bindings provide a low level interface to work with your serialport. It is possible to use them alone but it's usually easier to use them with an interface.
- [`@serialport/bindings`](api-bindings.md) bindings for Linux, Mac and Windows
- [`@serialport/binding-abstract`](api-binding-abstract.md) as an abstract class to use if you're making your own bindings
- [`@serialport/binding-mock`](api-binding-mock.md) for a mock binding package for testing

### Interfaces
Interfaces take a binding object and provide a different API on top of it. Currently we only ship a Node Stream Interface.

- [`@serialport/stream`](api-stream.md) our traditional Node.js Stream interface

### Parsers

Parsers are used to take raw binary data and transform them into usable messages. This may include tasks such as converting the data to text, emitting useful chunks of data when they have been fully received, or even validating protocols.

Parsers are traditionally Transform streams, but Duplex streams and other non stream interfaces are acceptable.

- [`@serialport/parser-byte-length`](api-parser-byte-length.md)
- [`@serialport/parser-cctalk`](api-parser-cctalk.md)
- [`@serialport/parser-delimiter`](api-parser-delimiter.md)
- [`@serialport/parser-readline`](api-parser-readline.md)
- [`@serialport/parser-ready`](api-parser-ready.md)
- [`@serialport/parser-regex`](api-parser-regex.md)
- [`@serialport/parser-slip-encoder`](api-parser-slip-encoder.md)

### Command Line Tools

The [Command Line Tools](guide-cli.md) provide helpful utilities for working with serial ports.

- [`@serialport/list`](guide-cli.md#serialport-list)
- [`@serialport/repl`](guide-cli.md#serialport-repl)
- [`@serialport/terminal`](guide-cli.md#serialport-terminal)


## License
SerialPort is [MIT licensed](https://github.com/node-serialport/node-serialport/blob/master/LICENSE) and all it's dependencies are MIT licensed.

2 changes: 1 addition & 1 deletion packages/binding-abstract/binding-abstract.js
Expand Up @@ -193,7 +193,7 @@ The in progress writes must error when the port is closed with an error object t
* @throws {TypeError} When given invalid arguments, a `TypeError` is thrown.
*/
getBaudRate() {
debug('getBuadRate')
debug('getbaudRate')
if (!this.isOpen) {
return Promise.reject(new Error('Port is not open'))
}
Expand Down
1 change: 0 additions & 1 deletion packages/website/core/Footer.js
Expand Up @@ -32,7 +32,6 @@ class Footer extends React.Component {
<h5>Docs</h5>
<a href={this.docUrl('guide-usage', this.props.language)}>Getting Started</a>
<a href={this.docUrl('guide-about', this.props.language)}>Guides</a>
<a href={this.docUrl('api-overview', this.props.language)}>API Reference</a>
</div>
<div>
<h5>Community</h5>
Expand Down
114 changes: 81 additions & 33 deletions packages/website/i18n/en.json
Expand Up @@ -4,39 +4,87 @@
"next": "Next",
"previous": "Previous",
"tagline": "Node.js package to access serial ports for Linux, OSX and Windows.",
"api-binding-abstract": "Abstract Binding",
"api-binding-mock": "Mock Bindings",
"api-bindings": "Bindings",
"api-overview": "Packages Overview",
"api-parser-byte-length": "ByteLength Parser",
"api-parser-cctalk": "ccTalk Parser",
"api-parser-delimiter": "Delimiter Parser",
"api-parser-readline": "Readline Parser",
"api-parser-ready": "Ready Parser",
"api-parser-regex": "Regex Parser",
"api-parser-slip-encoder": "Slip Encoder Parser",
"api-parsers-overview": "What are Parsers?",
"api-serialport": "SerialPort",
"api-stream": "Stream Interface",
"code-of-conduct": "Code of Conduct",
"guide-about": "About SerialPort",
"guide-cli": "Command Line Tools",
"guide-debugging": "Debugging",
"guide-errors": "Error Handling",
"guide-installation": "Installing SerialPort",
"guide-platform-support": "Support Environments",
"guide-testing": "Testing",
"guide-usage": "SerialPort Usage",
"Guides": "Guides",
"API": "API",
"GitHub": "GitHub",
"Getting Started": "Getting Started",
"Usage": "Usage",
"Community": "Community",
"Core": "Core",
"Bindings": "Bindings",
"Interfaces": "Interfaces",
"Parsers": "Parsers"
"docs": {
"api-binding-abstract": {
"title": "Abstract Binding"
},
"api-binding-mock": {
"title": "Mock Bindings"
},
"api-bindings": {
"title": "Bindings"
},
"api-parser-byte-length": {
"title": "ByteLength Parser"
},
"api-parser-cctalk": {
"title": "ccTalk Parser"
},
"api-parser-delimiter": {
"title": "Delimiter Parser"
},
"api-parser-readline": {
"title": "Readline Parser"
},
"api-parser-ready": {
"title": "Ready Parser"
},
"api-parser-regex": {
"title": "Regex Parser"
},
"api-parser-slip-encoder": {
"title": "Slip Encoder Parser"
},
"api-parsers-overview": {
"title": "What are Parsers?"
},
"api-serialport": {
"title": "SerialPort"
},
"api-stream": {
"title": "Stream Interface"
},
"code-of-conduct": {
"title": "Code of Conduct"
},
"guide-about": {
"title": "About SerialPort"
},
"guide-cli": {
"title": "Command Line Tools"
},
"guide-debugging": {
"title": "Debugging"
},
"guide-errors": {
"title": "Error Handling"
},
"guide-installation": {
"title": "Installing SerialPort"
},
"guide-platform-support": {
"title": "Support Environments"
},
"guide-testing": {
"title": "Testing"
},
"guide-usage": {
"title": "SerialPort Usage"
}
},
"links": {
"Docs": "Docs",
"GitHub": "GitHub"
},
"categories": {
"Getting Started": "Getting Started",
"Usage": "Usage",
"API Core": "API Core",
"API Bindings": "API Bindings",
"API Interfaces": "API Interfaces",
"API Parsers": "API Parsers",
"Community": "Community"
}
},
"pages-strings": {
"Learn more using the [api on this site.](|no description given": "Learn more using the [api on this site.](",
Expand Down

0 comments on commit d78ea84

Please sign in to comment.