Skip to content

Commit

Permalink
remove node option to simplify installation
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdesl committed Jun 8, 2018
1 parent 5782a55 commit f95d383
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
18 changes: 1 addition & 17 deletions README.md
Expand Up @@ -12,7 +12,6 @@ Some features:
- Hotkey for SVG rendering
- A builtin library of utilities for random numbers, geometry tools, SVG exporting, and other functions
- Easy integration with Inkscape and AxiDraw v3
- Plots can be rendered in Node.js instead of the browser, sometimes useful for huge print sizes where the browser may have more strict memory limits

## Quick Start

Expand Down Expand Up @@ -107,18 +106,9 @@ penplot plot.js --open

# set the output folder for SVG/PNG files
penplot plot.js --output=tmp

# generate a PNG with Node.js
penplot plot.js --node

# write PNG to stdout
penplot plot.js --node --stdout > file.png

# write PNG to custom output folder
penplot plot.js --node --output=tmp
```

## Node.js
## Print Output

You can also use this as a tool for developing algorithmic/generative art. For example, you can develop the artwork in a browser for LiveReload and fast iterations, and when you want to print it you can set the dimensions and output size like so:

Expand All @@ -139,12 +129,6 @@ export default function createPlot (context, dimensions) {
}
```

Then, use the `--node` flag to run the plot with `node-canvas`, assuming none of your code is browser-specific.

```sh
penplot my-plot.js --node --stdout > render.png
```

The `outputSize` option can be any of the following:

- a string with DPI resolution like `'300dpi'` or `'72 DPI'`
Expand Down
1 change: 1 addition & 0 deletions bin/dev.js
Expand Up @@ -25,6 +25,7 @@ function dev (args, argv, entries) {
const isNode = argv.node;
if (isNode) {
process.env.IS_NODE = envVars.IS_NODE = '1';
throw new Error('The --node option has been removed in penplot@3.x');
}

if (isNode) {
Expand Down
3 changes: 0 additions & 3 deletions package.json
Expand Up @@ -117,8 +117,5 @@
},
"bin": {
"penplot": "./bin/index.js"
},
"optionalDependencies": {
"canvas": "^1.6.5"
}
}

0 comments on commit f95d383

Please sign in to comment.