Skip to content

Commit

Permalink
Remove dependency on canvas (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
southpolesteve authored Dec 27, 2020
1 parent c3058ee commit cc63cdc
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 184 deletions.
7 changes: 7 additions & 0 deletions canvas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Why?

This adds a mock module for `canvas`. Nteract has a ignored require and undeclared dependency on this module. `cavnas` is a server side node module and is not used in browser side code for nteract.

Installing it locally (`npm install canvas`) will resolve the problem, but it is a native module so it is flaky depending on the system, node version, processor arch, etc. This module provides a simpler, more robust solution.

Remove this workaround if [this bug](https://github.com/nteract/any-vega/issues/2) ever gets resolved
1 change: 1 addition & 0 deletions canvas/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {}
11 changes: 11 additions & 0 deletions canvas/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "canvas",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Loading

0 comments on commit cc63cdc

Please sign in to comment.