Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to install paper without jsdom #1171

Closed
janslifka opened this issue Sep 21, 2016 · 5 comments
Closed

Possibility to install paper without jsdom #1171

janslifka opened this issue Sep 21, 2016 · 5 comments
Assignees

Comments

@janslifka
Copy link

We use paper.js in browser environment (electron app) so we don't need jsdom, but we install our dependencies using npm. Would it be possible to have jsdom in optional dependencies (same as canvas) so you don't have to install it for browser usage?

@lehni
Copy link
Member

lehni commented Dec 29, 2016

Yes, I guess we could / should? With Bower on its way out, using NPM in such hybrid ways is clearly the way forward...

@lehni lehni self-assigned this Dec 29, 2016
@lehni
Copy link
Member

lehni commented Dec 31, 2016

I can see some issues with this route though: There are scenarios where people will want to use Paper in Node.js, e.g. for SVG generation, but don't need the node-canvas module. This would cause them to either install all optional dependencies because they need JSDOM, or none of them...

As far as I know, there is no way for more fine grained control of this. It would be nice if NPM knew something like a target setting, which allow the definition of different types of dependencies based on the target...

@lehni
Copy link
Member

lehni commented Feb 8, 2017

Here is an idea for how to manage the different dependency requirements based on different environments: #1252 (comment)

What do you think?

@lehni
Copy link
Member

lehni commented Mar 19, 2017

I have done this now. This solution will soon be superseded by a better one, as described in #1252 (comment)

@lehni
Copy link
Member

lehni commented Mar 20, 2017

More about the improved plan here: #1252 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants