bizweekgraphics / swoopyarrows

swoopyarrows makes swoopy arrows between things
http://bizweekgraphics.com/swoopyarrows
The Unlicense
106 stars 7 forks source link

Package swoopyarrows for node #31

Open yanofsky opened 8 years ago

yanofsky commented 8 years ago

I'm looking to use swoopyarrows in Chartbuilder. Would it be possible to package this up and publish to npm? Do you want to do it? Would you rather me put in a pull request with the required changes?

Currently I'm using it by appending

module.exports = {
  swoopy: swoopyArrow,
  kooky: kookyArrow,
  loopy: loopyArrow
}

to swoopyArrows.js and putting

var swoopyArrow = require("../swoopyArrows.js").swoopy;

in my files

tophtucker commented 8 years ago

Yeah! I definitely want to. I held off because @aubergene and I were wondering if it'd make more sense to refactor into a d3 4.0 d3-shape custom curve generator module. I just haven't taken the time to get up to speed on d3 4.0. What do you think?

yanofsky commented 8 years ago

I think you make this compatible with D3v3.0 now and then refactor when v4.0 is more widely adopted. That way someone could use with either v3 or v4 depending on the version they specify in their package.json

tophtucker commented 8 years ago

You are a smart man, savvy in the modern ways of the javascript journeyman. I agree with your assessment with all my beating heart. I'll try this weekend.

On Fri, Apr 29, 2016 at 5:46 PM yanofsky notifications@github.com wrote:

I think you make this compatible with D3v3.0 now and then refactor when v4.0 is more widely adopted. That way someone could use with either v3 or v4 depending on the version they specify in their package.json

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/bizweekgraphics/swoopyarrows/issues/31#issuecomment-215890026

tophtucker commented 8 years ago

@yanofsky How does this look? https://github.com/bizweekgraphics/swoopyarrows/blob/npming/swoopyarrows.js

Should work in either npm or vanilla environments. The module (exposed as global swoopyarrows in vanilla env) is exactly as you described above:

module.exports = {
  swoopy: ...,
  kooky: ...,
  loopy: ...
}

I just need to update readme before publishing.

yanofsky commented 8 years ago

Sorry for the delay, just tested in Chartbuilder https://github.com/Quartz/Chartbuilder/commit/5c8c485db28b6ae97e72da3f26324d598f1e777d. It works perfectly.