Open letmaik opened 9 years ago
Thanks for offering to help, I can do my best to suggest configurations here. A good example to follow would be https://github.com/jspm/registry/blob/master/package-overrides/github/Dogfalo/materialize%400.96.1.json.
Perhaps let me know what questions you have about the process?
Ok, so here's my current nonworking override:
{
"main": "jQRangeSlider",
"shim": {
"jQRangeSlider": {
"deps": [
"jquery",
"jquery-ui",
"css/iThing.css!",
"jQRangeSliderMouseTouchs",
"jQRangeSliderDraggable",
"jQRangeSliderHandle",
"jQRangeSliderBar",
"jQRangeSliderLabel",
"jQDateRangeSlider",
"jQDateRangeSliderHandle"
]
}
},
"dependencies": {
"jquery": "github:components/jquery",
"jquery-ui": "github:components/jqueryui",
"css": "github:systemjs/plugin-css"
}
}
When building it says Error loading "jQRangeSliderMouseTouchs"
as it tries to load that from my project folder and not from the install location. What am I doing wrong?
EDIT: removed exports
, not sure what to put there
Where is jQRangeSliderMouseTouchs
supposed to be loaded from? Is that a file inside of jQRangeSlider
? If so then the deps value should be ./jQRangeSliderMouseTouchs
.
OK I added ./
to the local files and now I get
Potentially unhandled rejection [2] TypeError: Error loading "app/main" at http://localhost:8080/app/main.js
undefined is not a function
at Function.$.widget (http://localhost:8080/build.js:16153:25)
at http://localhost:8080/build.js:29140:9
at http://localhost:8080/build.js:29254:6
at http://localhost:8080/build.js:29255:6
at f (http://localhost:8080/jspm_packages/system.js:1:5970)
at f (http://localhost:8080/jspm_packages/system.js:1:5932)
at c (http://localhost:8080/jspm_packages/system.js:1:5586)
at http://localhost:8080/jspm_packages/system.js:1:6055
at http://localhost:8080/build.js:33856:20
at f (http://localhost:8080/jspm_packages/system.js:1:5970)
Line 29140 is $.widget("ui.dateRangeSlider", $.ui.rangeSlider, {
and line 16153 is basePrototype = new base();
. So that probably means $.ui.rangeSlider
is undefined. I wonder why, but I have a feeling something is wrong with the dependencies.
Yeah you need to ensure everything is shimmed correctly on everything else it depends on. Creating shims means creating the import graph, which does require careful work to ensure things are defined. Start small and work up - get a low-level module working (test System.import('jquery-ui'), System.import('jQRangeSlider/jQDateRangeSlider')` etc etc working up the tree. It's hard work I know.
Can you help getting https://github.com/ghusse/jQRangeSlider into the registry? I really like jspm and would like to contribute in the future, so if we can do this one together then I may be able to do the next one myself. Thanks!