cti-stix-visualization icon indicating copy to clipboard operation
cti-stix-visualization copied to clipboard

Independent library for Javascript module

Open capy-pl opened this issue 5 years ago • 7 comments

Is there any plan for creating an independent library to seperate the js module from other parts? Or consider adding a package.json so user can install the project by using npm install.

capy-pl avatar Mar 18 '19 06:03 capy-pl

Hi, @capy-pl, sorry for the delay in responding. We aren't currently working on this, but it would be a good feature and we'd welcome a pull request if anyone had time to do it. :)

clenk avatar May 24 '19 14:05 clenk

@clenk I may take a look at this.

I think the question I have is, what's the purpose of the python code in this repo?

dwjohnston avatar Mar 28 '22 07:03 dwjohnston

Hi @dwjohnston thanks for the interest. The python code is used to enable visualizing STIX content inside Jupyter notebooks. More info here. The STIX generator uses it for this purpose.

clenk avatar Mar 28 '22 14:03 clenk

@clenk with the dependencies that you have copied in here:

  • requirejs
  • d3

Have those been modified in any way?

Also, looks like d3 version is 3.5.14 - I should assume that ^3 is the only supported version?

dwjohnston avatar Mar 29 '22 02:03 dwjohnston

@clenk Alright man - take a look at the PR.

For testing on your side:

  • Follow the 'local use' instructions to see that your existing example use (the index.html) still works
  • This repo here demonstrates use of it as a package: https://github.com/dwjohnston/stix-vis-test
  • Can you check that it still works with Jupyter?

dwjohnston avatar Mar 29 '22 06:03 dwjohnston

Thanks @dwjohnston I'll take a look when I get the chance. The dependencies have not been modified in any way.

For d3, we've been looking into upgrading it and actually are looking at switching to Apache ECharts.

clenk avatar Mar 29 '22 20:03 clenk

Thanks @dwjohnston I'll take a look when I get the chance. The dependencies have not been modified in any way.

For d3, we've been looking into upgrading it and actually are looking at switching to Apache ECharts.

Ooh, that reminds me - probably should update the PR to remove the hardcoded d3.js and instead refer to one in the node modules. (Otherwise the published NPM package, the use in Jupyter/local may be different).

dwjohnston avatar Mar 29 '22 23:03 dwjohnston