Skip to content

Commit

Permalink
Merge pull request #1 from chocolateboy/patch-1
Browse files Browse the repository at this point in the history
Fix doc typos
  • Loading branch information
ramhejazi committed Jul 17, 2018
2 parents 1700eee + 7e04d7f commit 07aa92f
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
</div>
<br>

`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
Expand All @@ -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')
Expand Down Expand Up @@ -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.
Expand All @@ -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
```
Expand Down

0 comments on commit 07aa92f

Please sign in to comment.