From 7e04d7f9c30d40d0dc40bef1acd843ad339650ff Mon Sep 17 00:00:00 2001 From: chocolateboy Date: Mon, 16 Jul 2018 23:29:51 +0000 Subject: [PATCH] Fix doc typos --- README.md | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index ddb1188..52af5a6 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,10 @@
-`draxt` is a utility module for selecting and manipulating file system's objects in node.js environment. -It uses [`glob`](https://en.wikipedia.org/wiki/Glob_(programming)) patterns as it's "selector engine". `draxt` also provides several DOM-like interfaces representing -file system's objects that use promisified [`fs`](https://nodejs.org/api/fs.html) module and [`fs-extra`](https://github.com/jprichardson/node-fs-extra) module APIs. +`draxt` is a utility module for selecting and manipulating filesystem objects in a Node.js environment. +It uses [`glob`](https://en.wikipedia.org/wiki/Glob_(programming)) patterns as its "selector engine". `draxt` also provides several DOM-like interfaces representing filesystem objects which build on promisified APIs for the [`fs`](https://nodejs.org/api/fs.html) and [`fs-extra`](https://github.com/jprichardson/node-fs-extra) modules. -> _draxt_ means _tree_ in [Pahlavi language](https://en.wikipedia.org/wiki/Middle_Persian). +> _draxt_ means _tree_ in the [Pahlavi language](https://en.wikipedia.org/wiki/Middle_Persian). ```html /app @@ -31,6 +30,7 @@ file system's objects that use promisified [`fs`](https://nodejs.org/api/fs.html └── views/ └── index.njk/ ``` + ```js // Let's use a familiar variable name! const $ = require('draxt') @@ -62,10 +62,11 @@ const $ = require('draxt') **Key notes**: - `draxt` has only 2 dependencies: [`glob`](https://github.com/isaacs/node-glob) and [`fs-extra`](https://github.com/jprichardson/node-fs-extra) modules. - - `draxt` uses `glob` patterns for selecting file system objects. - - Each item in `draxt` collections is an instance of [`File`](https://github.com/ramhejazi/draxt/blob/master/docs/File.md), [`Directory`](https://github.com/ramhejazi/draxt/blob/master/docs/Directory.md), [`SymbolicLink`](https://github.com/ramhejazi/draxt/blob/master/docs/SymbolicLink.md) classes which are sub-classes of [`Node`](https://github.com/ramhejazi/draxt/blob/master/docs/Node.md) class. - - Every asynchronous method has a synchronous version. E.g. [`node.siblingsSync()`](https://github.com/ramhejazi/draxt/blob/master/docs/Node.md#nodesiblingssyncpattern-options) for `node.siblings()`. - - `draxt` is a simple constructor function. You can extend/overwrite it's methods via it's `prototype` property (or it's alias: `fn`) or by using the [`draxt.extend`](https://github.com/ramhejazi/draxt/blob/master/docs/draxt.md#draxtextendmethods) method. + - `draxt` uses `glob` patterns to select filesystem objects. + - Each item in a `draxt` collection is an instance of a [`File`](https://github.com/ramhejazi/draxt/blob/master/docs/File.md), [`Directory`](https://github.com/ramhejazi/draxt/blob/master/docs/Directory.md), or [`SymbolicLink`](https://github.com/ramhejazi/draxt/blob/master/docs/SymbolicLink.md) class, which is a subclass of [`Node`](https://github.com/ramhejazi/draxt/blob/master/docs/Node.md). + - Every asynchronous method has a synchronous version. E.g., [`node.siblingsSync()`](https://github.com/ramhejazi/draxt/blob/master/docs/Node.md#nodesiblingssyncpattern-options) for `node.siblings()`. + - `draxt` is a simple constructor function. You can extend/overwrite its methods via its `prototype` property (or its `fn` alias) or by using the [`draxt.extend`](https://github.com/ramhejazi/draxt/blob/master/docs/draxt.md#draxtextendmethods) method. + ```js const draxt = require('draxt'); // add a method (`images`) for filtering image files. @@ -78,25 +79,30 @@ const $ = require('draxt') ``` ## Install - Installing via [npm](https://docs.npmjs.com/getting-started/what-is-npm): - ```bash - $ npm i draxt - ``` - Via [yarn](https://yarnpkg.com/en/) package manager: - ```bash - $ yarn add draxt - ``` +Installing via [npm](https://docs.npmjs.com/getting-started/what-is-npm): + +```bash +$ npm i draxt +``` + +Via [yarn](https://yarnpkg.com/en/): + +```bash +$ yarn add draxt +``` ## Docs + - [`draxt` APIs](https://github.com/ramhejazi/draxt/blob/master/docs/draxt.md) - Interfaces - - [`Node` class APIs](https://github.com/ramhejazi/draxt/blob/master/docs/Node.md) - - [`File` class APIs](https://github.com/ramhejazi/draxt/blob/master/docs/File.md) - - [`Directory` class APIs](https://github.com/ramhejazi/draxt/blob/master/docs/Directory.md) - - [`SymbolicLink` class APIs](https://github.com/ramhejazi/draxt/blob/master/docs/SymbolicLink.md) + - [`Node`](https://github.com/ramhejazi/draxt/blob/master/docs/Node.md) + - [`File`](https://github.com/ramhejazi/draxt/blob/master/docs/File.md) + - [`Directory`](https://github.com/ramhejazi/draxt/blob/master/docs/Directory.md) + - [`SymbolicLink`](https://github.com/ramhejazi/draxt/blob/master/docs/SymbolicLink.md) ## Test + ```bash $ npm test ```