Skip to content

Commit

Permalink
Merge pull request #143 from spiltcoffee/README.md
Browse files Browse the repository at this point in the history
fix(readme): fixed README.md files
  • Loading branch information
spiltcoffee authored Sep 7, 2019
2 parents 88022d8 + 4404a2a commit 228246d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 21 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,27 @@
>
> Inspired by the excellent PostCSS tool, motivated by my rage at the Delphi IDE.
![npm: @postdfm/dfm2ast](https://img.shields.io/npm/v/@postdfm/dfm2ast.svg?label=npm%3A%20%40postdfm%2Fdfm2ast)
![CircleCI branch](https://img.shields.io/circleci/project/github/spiltcoffee/postdfm/master.svg)
![Codecov branch](https://img.shields.io/codecov/c/gh/spiltcoffee/postdfm/master.svg)
[![CircleCI branch](https://img.shields.io/circleci/project/github/spiltcoffee/postdfm/master.svg)](https://circleci.com)
[![Codecov branch](https://img.shields.io/codecov/c/gh/spiltcoffee/postdfm/master.svg)](https://codecov.io)
[![Greenkeeper](https://badges.greenkeeper.io/spiltcoffee/postdfm.svg)](https://greenkeeper.io/)

## Table of Contents

- [Packages](#packages)
- [Installation](#installation)
- [Example Usage](#example-usage)
- [Contributing](#contributing)
- [License](#license)

## Packages

| Package | Version |
| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| [`postdfm`](/packages/postdfm) | [![npm](https://img.shields.io/npm/v/postdfm.svg?label=npm)](https://www.npmjs.com/package/postdfm) |
| [`@postdfm/ast`](/packages/@postdfm/ast) | [![npm](https://img.shields.io/npm/v/@postdfm/ast.svg?label=npm)](https://www.npmjs.com/package/@postdfm/ast) |
| [`@postdfm/ast2dfm`](/packages/@postdfm/ast2dfm) | [![npm](https://img.shields.io/npm/v/@postdfm/ast2dfm.svg?label=npm)](https://www.npmjs.com/package/@postdfm/ast2dfm) |
| [`@postdfm/dfm2ast`](/packages/@postdfm/dfm2ast) | [![npm](https://img.shields.io/npm/v/@postdfm/dfm2ast.svg?label=npm)](https://www.npmjs.com/package/@postdfm/dfm2ast) |

## Installation

The `postdfm` project is an interface wrapping all the separate modules together.
Expand Down Expand Up @@ -57,13 +66,13 @@ const transDfm = runner.processSync(dfm, {
fs.writeFileSync("trans.dfm", transDfm);
```

See the [`postdfm` README.md](https://github.com/spiltcoffee/postdfm/blob/master/packages/postdfm/README.md) for more information.
See the [`postdfm`](packages/postdfm) package for more information.

## Contributing

Bug reports and feature requests are greatly appreciated, as are pull requests.

Please see the [Contributing Guide](https://github.com/spiltcoffee/postdfm/blob/master/CONTRIBUTING.md) for instructions on how to contribute to this project.
Please see the [Contributing Guide](/.github/CONTRIBUTING.md) for instructions on how to contribute to this project.

## License

Expand Down
5 changes: 5 additions & 0 deletions packages/@postdfm/ast/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# @postdfm/ast

[![npm](https://img.shields.io/npm/v/@postdfm/ast.svg?label=npm)](https://www.npmjs.com/package/@postdfm/ast)
[![CircleCI branch](https://img.shields.io/circleci/project/github/spiltcoffee/postdfm/master.svg)](https://circleci.com)
[![Codecov branch](https://img.shields.io/codecov/c/gh/spiltcoffee/postdfm/master.svg)](https://codecov.io)
[![Greenkeeper](https://badges.greenkeeper.io/spiltcoffee/postdfm.svg)](https://greenkeeper.io/)

Sub-package for `postdfm`.

Provides the AST structures used by `postdfm`.
Expand Down
5 changes: 5 additions & 0 deletions packages/@postdfm/ast2dfm/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# @postdfm/ast2dfm

[![npm](https://img.shields.io/npm/v/@postdfm/ast2dfm.svg?label=npm)](https://www.npmjs.com/package/@postdfm/ast2dfm)
[![CircleCI branch](https://img.shields.io/circleci/project/github/spiltcoffee/postdfm/master.svg)](https://circleci.com)
[![Codecov branch](https://img.shields.io/codecov/c/gh/spiltcoffee/postdfm/master.svg)](https://codecov.io)
[![Greenkeeper](https://badges.greenkeeper.io/spiltcoffee/postdfm.svg)](https://greenkeeper.io/)

Sub-package for `postdfm`.

Provides functionality for turning the structure provided by `@postdfm/ast` into a string.
Expand Down
5 changes: 5 additions & 0 deletions packages/@postdfm/dfm2ast/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# @postdfm/dfm2ast

[![npm](https://img.shields.io/npm/v/@postdfm/dfm2ast.svg?label=npm)](https://www.npmjs.com/package/@postdfm/dfm2ast)
[![CircleCI branch](https://img.shields.io/circleci/project/github/spiltcoffee/postdfm/master.svg)](https://circleci.com)
[![Codecov branch](https://img.shields.io/codecov/c/gh/spiltcoffee/postdfm/master.svg)](https://codecov.io)
[![Greenkeeper](https://badges.greenkeeper.io/spiltcoffee/postdfm.svg)](https://greenkeeper.io/)

Sub-package for `postdfm`.

Provides functionality for parsing DFMs into the structures provided by `@postdfm/ast`.
Expand Down
32 changes: 16 additions & 16 deletions packages/postdfm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
>
> Inspired by the excellent PostCSS tool, motivated by my rage at the Delphi IDE.
![npm: @postdfm/dfm2ast](https://img.shields.io/npm/v/@postdfm/dfm2ast.svg?label=npm%3A%20%40postdfm%2Fdfm2ast)
![CircleCI branch](https://img.shields.io/circleci/project/github/spiltcoffee/postdfm/master.svg)
![Codecov branch](https://img.shields.io/codecov/c/gh/spiltcoffee/postdfm/master.svg)
[![npm](https://img.shields.io/npm/v/postdfm.svg?label=npm)](https://www.npmjs.com/package/postdfm)
[![CircleCI branch](https://img.shields.io/circleci/project/github/spiltcoffee/postdfm/master.svg)](https://circleci.com)
[![Codecov branch](https://img.shields.io/codecov/c/gh/spiltcoffee/postdfm/master.svg)](https://codecov.io)
[![Greenkeeper](https://badges.greenkeeper.io/spiltcoffee/postdfm.svg)](https://greenkeeper.io/)

## Table of Contents
Expand Down Expand Up @@ -69,59 +69,59 @@ const postdfm = require("postdfm");
const runner = postdfm();
```

#### `postdfm(options?: IRunnerOptions)`
#### `postdfm(options?: RunnerOptions)`

Create a `Runner` instance using `IRunnerOptions`
Create a `Runner` instance using `RunnerOptions`

#### `runner.process(dfm: string, processingOptions: IProcessingOptions): Promise<string>`
#### `runner.process(dfm: string, processingOptions: ProcessingOptions): Promise<string>`

Process a file through the runner asynchronously.

#### `runner.processSync(dfm: string, processingOptions: IProcessingOptions): string`
#### `runner.processSync(dfm: string, processingOptions: ProcessingOptions): string`

Process a file through the runner synchronously.

### `IRunnerOptions`
### `RunnerOptions`

Options to pass to an instance of `Runner`.

#### `options.transformers: ITransformer[]`
#### `options.transformers: Transformer[]`

Array of transformations to perform on AST.

#### `options.parser: IParser = "@postdfm/dfm2ast"`
#### `options.parser: Parser = "@postdfm/dfm2ast"`

Parser to use, defaults to `@postdfm/dfm2ast`.

#### `options.stringifier: IStringifier = "@postdfm/ast2dfm"`
#### `options.stringifier: Stringifier = "@postdfm/ast2dfm"`

Stringifier to use, defaults to `@postdfm/ast2dfm`.

### `ITransformer`
### `Transformer`

A function that takes an AST, transforms it, and returns it.

```js
(ast: AST.Root): AST.Root
```

### `IParser`
### `Parser`

A function that takes a string, parses it, and returns an AST.

```js
(dfm: string): AST.Root
```

### `IStringifier`
### `Stringifier`

A function that takes an AST, stringifies it, and returns a string.

```js
(ast: AST.Root): string
```

### `IProcessingOptions`
### `ProcessingOptions`

#### `processingOptions.from`

Expand All @@ -135,7 +135,7 @@ You can find the generated `typedoc` documentation [here](https://spiltcoffee.co

Bug reports and feature requests are greatly appreciated, as are pull requests.

Please see the [Contributing Guide](https://github.com/spiltcoffee/postdfm/blob/master/CONTRIBUTING.md) for instructions on how to contribute to this project.
Please see the [Contributing Guide](https://github.com/spiltcoffee/postdfm/blob/master/.github/CONTRIBUTING.md) for instructions on how to contribute to this project.

## License

Expand Down

0 comments on commit 228246d

Please sign in to comment.