Open cosmo-naut opened 6 years ago
Is there any specific way I need to import it in conjunction with ccv?
this is a reduced version of the ccv in order to reduce the size of the source files, I have a plan to release other algorithms on separated packages
So I would want to include src/LoadSWT.js as well as ccv/js/ccv.js?
no, just the LoadSWT should do the work...
What about the ml-matrix dependency of that file? Sorry to bother you, your help is greatly appreciated
I guess that you are able to browserify and it gets all the dependencies, otherwise I will try it and tell you later
I am having an error being unable to find the distribution folder ../dist/ccv It is present nowhere in the git repo
are you using npm? or you are using only the repo, if you are using the repo you have to compile it (download the repo with it's submodules) and compile it, to have those folder, also you can run the test to check if it's ok (npm run test)
to install it, you need to install emscripten, then you just have to compile using emmake make
over the repo root (I will add to the readme how to compile it), if you use the npm package it contains the compiled sources on the ccv folder
I am currently trying to use npm.
The folder in my node_modules folder only contains lib and src, am I doing it incorrectly?
I used the command npm install --save stroke-width-transform
Then when I attempt to browserify I use browserify loadSWT.js -o bundleSWT.js
however it running into problems
ok, just let me try, I guess that the dist folder is missing on the npm package...
Hello, currently it should work, download the latest version on npm and try to run it.
I test it on runkit and it loads well: https://npm.runkit.com/stroke-width-transform
note: Actually the build on travis is failing because I got some error on the docker image from emscripten so don't pay attention to it...
Can confirm the new build has dist after an update.
I am currently getting the following error however:
node_modules\stroke-width-transform\src\index.js:1 import loadSWT from './loadSWT'; ^ ParseError: 'import' and 'export' may appear only with 'sourceType: module'
Googling the error and looking into other GitHubs, apparently there a couple of solutions but they may be specific to other applications. This one for instance says to add "parserOptions": { "sourceType": "module", }
somewhere.
This might also have something to do with it, maybe it'll help. All of this is a little out of my knowledge at the moment, I'm not sure what the relationship between all of these various softwares is
it's weird because it should load the module using the index that is on the 'lib' folder, and in that folder there's no import
and export
@cosmo-naut @JeffersonH44 I just built the source folder with babel and referenced src/index.js manually. Works fine.
It should work on the browser @cosmo-naut