I've moved the core of the logic out to stix2viscore.js. Retain stix2vis for compatibility with what you already have.
Adds a package.json
Adds linting - I mostly added this to help me remove all the non-strict js.
Adds typescript as a dependency - I'm using TypeScript to compile - but currently I haven't added types, but this would be a very nice feature feature.
Add package scripts (allow you to see the browser, build command)
Notes
Re: the use of requirejs, and the "nbextensions" stuff - I don't really know what I'm doing there - but what I've got looks like it's working.
Possible bug
Take a look at that handleSelected in stix2viscore.js - it looks like it is never defined anywhere.
Worth discussing
Should the PNG be included in the package?
With putting all of the code in stix2viscore.js you will lose your commit history. Possibly better to put the Jupyter stuff in a different file.
Addresses: #42
Changes:
stix2viscore.js
. Retainstix2vis
for compatibility with what you already have.Notes
Re: the use of requirejs, and the
"nbextensions"
stuff - I don't really know what I'm doing there - but what I've got looks like it's working.Possible bug
Take a look at that
handleSelected
instix2viscore.js
- it looks like it is never defined anywhere.Worth discussing
stix2viscore.js
you will lose your commit history. Possibly better to put the Jupyter stuff in a different file.Testing
I tested that it works as an npm package here:
https://github.com/dwjohnston/stix-vis-test
Follow the instructions there.
Things that need to be done before this PR is merged:
name
Future improvements: