Skip to content

Commit

Permalink
docs: use named import for all esbuild plugin examples
Browse files Browse the repository at this point in the history
  • Loading branch information
linbudu599 committed Mar 5, 2022
1 parent faa23df commit 1e84e31
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 286 deletions.
26 changes: 10 additions & 16 deletions docs/derived/esbuild.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# ESBuild

## Note

**Note: All plugins require ESBuild version ^0.14.0 as peerDependencies.**

## alias path

ESBuild plugin for alias replacement.

**Note: this plugin require ESBuild version ^0.11.19 for the `onStart`/`onEnd` hooks.**

```bash
npm install esbuild-plugin-alias-path --save-dev
yarn add esbuild-plugin-alias-path --save-dev
Expand Down Expand Up @@ -70,8 +72,6 @@ esbuildPluginAliasPath({

ESBuild plugin for cleaning up output/assets before building.

**Note: this plugin require ESBuild version ^0.11.19 for the `onStart`/`onEnd` hooks.**

```bash
npm install esbuild-plugin-clean --save-dev
pnpm install esbuild-plugin-clean --save-dev
Expand All @@ -80,7 +80,7 @@ yarn add esbuild-plugin-clean --save-dev

```typescript
import { build } from 'esbuild';
import clean from 'esbuild-plugin-clean';
import { clean } from 'esbuild-plugin-clean';

(async () => {
const res = await build({
Expand Down Expand Up @@ -125,8 +125,6 @@ export interface CleanOptions {

ESBuild plugin for output compression (`gzip`/`brotli`).

**Note: this plugin require ESBuild version ^0.11.19 for the `onStart`/`onEnd` hooks.**

```bash
npm install esbuild-plugin-compress --save-dev
pnpm install esbuild-plugin-compress --save-dev
Expand All @@ -135,7 +133,7 @@ yarn add esbuild-plugin-compress --save-dev

```typescript
import { build } from 'esbuild';
import compress from 'esbuild-plugin-compress';
import { compress } from 'esbuild-plugin-compress';

(async () => {
const res = await build({
Expand Down Expand Up @@ -181,8 +179,6 @@ export interface CompressOptions {

ESBuild plugin for assets copy handle.

**Note: this plugin require ESBuild version ^0.11.19 for the `onStart`/`onEnd` hooks.**

```bash
npm install esbuild-plugin-copy --save-dev
pnpm install esbuild-plugin-copy --save-dev
Expand All @@ -191,7 +187,7 @@ yarn add esbuild-plugin-copy --save-dev

```typescript
import { build } from 'esbuild';
import copy from 'esbuild-plugin-copy';
import { copy } from 'esbuild-plugin-copy';

(async () => {
const res = await build({
Expand Down Expand Up @@ -315,8 +311,6 @@ export interface ESBuildPluginDecoratorOptions {

ESBuild plugin for displaying output file size info.

**Note: this plugin require ESBuild version ^0.11.19 for the `onStart`/`onEnd` hooks.**

```bash
npm install esbuild-plugin-filesize --save-dev
pnpm install esbuild-plugin-filesize --save-dev
Expand Down Expand Up @@ -374,7 +368,7 @@ yarn add esbuild-plugin-ignore-module --save-dev

```typescript
import { build } from 'esbuild';
import ignore from 'esbuild-plugin-ignore-module';
import { ignore } from 'esbuild-plugin-ignore-module';

(async () => {
const res = await build({
Expand Down Expand Up @@ -471,7 +465,7 @@ yarn add esbuild-plugin-markdown-import --save-dev

```typescript
import { build } from 'esbuild';
import markdown from 'esbuild-plugin-markdown-import';
import { markdown } from 'esbuild-plugin-markdown-import';
(async () => {
const res = await build({
Expand Down Expand Up @@ -611,7 +605,7 @@ yarn add esbuild-plugin-run --save-dev

```typescript
import { build } from 'esbuild';
import run from 'esbuild-plugin-run';
import { run } from 'esbuild-plugin-run';
(async () => {
const res = await build({
Expand Down
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,29 @@
"@nrwl/tao": "13.8.4",
"@nrwl/workspace": "13.8.4",
"@types/fs-extra": "^9.0.13",
"@types/glob": "^7.2.0",
"@types/jest": "27.4.1",
"@types/jsonfile": "^6.1.0",
"@types/lodash": "^4.14.179",
"@types/node": "17.0.21",
"@types/semver": "^7.3.9",
"@typescript-eslint/eslint-plugin": "~5.10.0",
"@typescript-eslint/parser": "~5.10.0",
"cac": "^6.7.12",
"consola": "^2.15.3",
"esbuild": "^0.14.25",
"eslint": "~8.10.0",
"eslint-config-prettier": "8.5.0",
"fs-extra": "^10.0.1",
"jest": "27.5.1",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"ow": "^0.28.1",
"pacote": "^13.0.3",
"prettier": "^2.5.1",
"sort-package-json": "^1.54.0",
"ts-jest": "27.1.3",
"ts-morph": "^14.0.0",
"tslib": "^2.3.1",
"typescript": "~4.6.2"
},
Expand Down
1 change: 1 addition & 0 deletions packages/esbuild-plugin-alias-path/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"main": "src/index.js",
"typings": "src/index.d.ts"
},
"scripts": {},
"dependencies": {
"find-up": "5.0.0",
"jsonfile": "^6.1.0"
Expand Down
Loading

0 comments on commit 1e84e31

Please sign in to comment.