From 4404a2a406c4481a702b5a10f97adf95fc235da8 Mon Sep 17 00:00:00 2001 From: spiltcoffee Date: Sat, 7 Sep 2019 15:49:16 +1000 Subject: [PATCH] fix(readme): fixed README.md files --- README.md | 19 ++++++++++++----- packages/@postdfm/ast/README.md | 5 +++++ packages/@postdfm/ast2dfm/README.md | 5 +++++ packages/@postdfm/dfm2ast/README.md | 5 +++++ packages/postdfm/README.md | 32 ++++++++++++++--------------- 5 files changed, 45 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 0cab351b..957c90e5 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 diff --git a/packages/@postdfm/ast/README.md b/packages/@postdfm/ast/README.md index 6501d8bd..a0d5a096 100644 --- a/packages/@postdfm/ast/README.md +++ b/packages/@postdfm/ast/README.md @@ -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`. diff --git a/packages/@postdfm/ast2dfm/README.md b/packages/@postdfm/ast2dfm/README.md index 229dc447..adda5616 100644 --- a/packages/@postdfm/ast2dfm/README.md +++ b/packages/@postdfm/ast2dfm/README.md @@ -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. diff --git a/packages/@postdfm/dfm2ast/README.md b/packages/@postdfm/dfm2ast/README.md index 4a80521b..ba57f374 100644 --- a/packages/@postdfm/dfm2ast/README.md +++ b/packages/@postdfm/dfm2ast/README.md @@ -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`. diff --git a/packages/postdfm/README.md b/packages/postdfm/README.md index 5f7387a8..7f28f78b 100644 --- a/packages/postdfm/README.md +++ b/packages/postdfm/README.md @@ -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 @@ -69,35 +69,35 @@ 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` +#### `runner.process(dfm: string, processingOptions: ProcessingOptions): Promise` 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. @@ -105,7 +105,7 @@ A function that takes an AST, transforms it, and returns it. (ast: AST.Root): AST.Root ``` -### `IParser` +### `Parser` A function that takes a string, parses it, and returns an AST. @@ -113,7 +113,7 @@ A function that takes a string, parses it, and returns an AST. (dfm: string): AST.Root ``` -### `IStringifier` +### `Stringifier` A function that takes an AST, stringifies it, and returns a string. @@ -121,7 +121,7 @@ A function that takes an AST, stringifies it, and returns a string. (ast: AST.Root): string ``` -### `IProcessingOptions` +### `ProcessingOptions` #### `processingOptions.from` @@ -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