Skip to content

Commit

Permalink
Update parcel-api.md (#731)
Browse files Browse the repository at this point in the history
* Update parcel-api.md

* Update parcel-api.md
  • Loading branch information
mischnic authored Oct 14, 2020
1 parent f8a6f65 commit b9cb038
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/features/parcel-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ summary: How to use @parcel/core programatically

```js
import path from "path";
import defaultConfigContents from "@parcel/config-default";
import Parcel from "@parcel/core";

(async () => {
let bundler = new Parcel({
entries: path.join(__dirname, "src/index.js"),
defaultConfig: {
...defaultConfigContents,
filePath: require.resolve("@parcel/config-default"),
},
defaultConfig: require.resolve("@parcel/config-default"),
defaultEngines: {
browsers: ["last 1 Chrome version"],
node: "10",
Expand All @@ -45,7 +41,6 @@ import Parcel from "@parcel/core";
```js
import path from "path";
import Parcel, { createWorkerFarm } from "@parcel/core";
import defaultConfigContents from "@parcel/config-default";
import { NodeFS, MemoryFS } from "@parcel/fs";

const DIST_DIR = "/dist";
Expand All @@ -60,11 +55,7 @@ const DIST_DIR = "/dist";
try {
let b = new Parcel({
entries: [path.join(__dirname, "src", "index.html")],
defaultConfig: {
...defaultConfigContents,
reporters: [],
filePath: require.resolve("@parcel/config-default"),
},
defaultConfig: require.resolve("@parcel/config-default"),
inputFS: inputFS,
outputFS: outputFS,
workerFarm,
Expand Down

1 comment on commit b9cb038

@vercel
Copy link

@vercel vercel bot commented on b9cb038 Oct 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.