Skip to content

Commit

Permalink
Corrected readme
Browse files Browse the repository at this point in the history
  • Loading branch information
w8r committed Jul 5, 2023
1 parent 9e8a1ea commit 6891122
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `inline-function`
# `inline-functions`

This plugin allows you to inline functions in your code. This is useful for performance reasons, as it allows you to avoid function calls and instead inline the function body directly.

Expand All @@ -9,7 +9,7 @@ Inspired by the clever trick used in [`robust-predicates`](https://github.com/mo
## Installation

```bash
npm install inline-function [vite] [rollup] [esbuild]
npm install inline-functions [vite] [rollup] [esbuild]
```

## How it works
Expand Down Expand Up @@ -86,14 +86,14 @@ console.log(foo, baz);
### Vite

```bash
npm install inline-function vite
npm install inline-functions vite
```

Then, in your [`vite.config.ts`](./test/vite.config.ts):

```ts
import { defineConfig } from "vite";
import inlineFunction from "inline-function/vite";
import inlineFunction from "inline-functions/vite";
import { resolve } from "path";

import { macros } from "./macros";
Expand All @@ -107,13 +107,13 @@ export default defineConfig({
### Esbuild

```bash
npm install inline-function esbuild
npm install inline-functions esbuild
```

Then, in your [`esbuild.config.js`](./test/esbuild.config.js):

```ts
import inlineFunction from "inline-function/esbuild";
import inlineFunction from "inline-functions/esbuild";
import { macros } from "./macros";
esbuild
.build({
Expand All @@ -128,7 +128,7 @@ esbuild
### Rollup

```bash
npm install inline-function rollup
npm install inline-functions rollup
```

Then, in your [`rollup.config.js`](./test/rollup.config.ts):
Expand Down

0 comments on commit 6891122

Please sign in to comment.