These are chat archives for systemjs/systemjs

14th
Jan 2016
Scott Smith
@scottadamsmith
Jan 14 2016 00:48
@simonfox perhaps try the global dependency approach described here? http://stackoverflow.com/a/34500613
Simon Fox
@simonfox
Jan 14 2016 02:06
@scottadamsmith thanks.....still doesn't really explain why unbundled there is no problem though?
Scott Smith
@scottadamsmith
Jan 14 2016 02:40
@simonfox Yeah you got me there, sorry. I'll follow up if I see anything that seems related
Simon Fox
@simonfox
Jan 14 2016 03:34

sorry, back to basics....if I have in my map:

"bootstrap": "github:twbs/bootstrap@3.3.6",
"jquery": "npm:jquery@2.2.0",
"ms-signalr-client": "npm:ms-signalr-client@2.2.2",
"github:twbs/bootstrap@3.3.6": {
      "jquery": "github:components/jquery@2.2.0"
},
"npm:ms-signalr-client@2.2.2": {
      "jquery": "npm:jquery@2.2.0"
}

I should use an override to redirect the jquery dependency of github:twbs/bootstrap correct?

what should that look like?......I've tried a bunch of things and I still end up with both jquery packages in my bundle!
Chris Smola
@Smolations
Jan 14 2016 04:30
my guess would be that it's because one is an npm package and the other is straight from github
make them both npm or both github and see what happens
Simon Fox
@simonfox
Jan 14 2016 04:37
@Smolations Not sure what you mean? Top level deps for bootstrap and signalr are installed via jspm install. Just happens that each of those has a jquery dep from different places even though the version is the same. What I need is an install override for bootstrap to redirect it's jquery dep to be the same as the top level one
Chris Smola
@Smolations
Jan 14 2016 04:39
if you do $ npm info jquery you will see that the repo is defined as:
repository: 
   { type: 'git',
     url: 'git+https://github.com/jquery/jquery.git' }
but the github version you reference is at ../components/jquery.git
so that's why my thought was that jspm sees them as two separate packages, not the same package

so when your map says

"github:twbs/bootstrap@3.3.6": {
      "jquery": "github:components/jquery@2.2.0"
},
"npm:ms-signalr-client@2.2.2": {
      "jquery": "npm:jquery@2.2.0"
}

you are telling jspm to use the github package for bootstrap, but the npm package for signalr. do you see what i mean?

as opposed to:

"github:twbs/bootstrap@3.3.6": {
      "jquery": "npm:jquery@2.2.0"
},
"npm:ms-signalr-client@2.2.2": {
      "jquery": "npm:jquery@2.2.0"
}

which tells jspm to use the npm package as a dependency for both

Simon Fox
@simonfox
Jan 14 2016 04:43
It's the bootstrap package that refs github jquery and I have no control over that dep, that's why I think I need an override
Chris Smola
@Smolations
Jan 14 2016 04:44
why not just edit the map instead...?
(and i'm fairly new to jspm too so i'm going off of what i've grokked so far)
in guy's talk at jsconf, he actually takes the time to show how a dependency for one package can be the override for another. in that example he simply edits the config.js file directly, modifying the map entry
unless i'm confuzzled about what he was actually doing.. :yum:
Simon Fox
@simonfox
Jan 14 2016 04:56
I'm pretty sure directly editing config.js isn't recommended workflow...
Chris Smola
@Smolations
Jan 14 2016 05:08
i'd have to say you are mistaken there. there is no possible way to define all of the outcomes in that file only from your package.json.
plus there's a specific section in the docs explaining the different options for the config
and again, guy does just that in the jsconf talk...
Simon Fox
@simonfox
Jan 14 2016 05:13
Sorry I more meant the parts inserted by jspm install commands....I may be completely wrong though.
Chris Smola
@Smolations
Jan 14 2016 05:15
yea i try and only do that when i feel i need to start fresh. once i'm into the nitty gritty of defining maps and shims and the like, i only use jspm update
Simon Fox
@simonfox
Jan 14 2016 05:38
Ah @Smolations you are right! See
in my case, i am converting an existing requirejs/amd project to be a jspm project. i just needed jspm to be initially generated from the package.json and then i could configure what i need in the config file
Simon Fox
@simonfox
Jan 14 2016 05:59
I was referring to the statement about it being fine to change dep versions within config.js
Chris Smola
@Smolations
Jan 14 2016 06:09
oh my fault. long day i guess...lol :persevere: :gun:
Simon Fox
@simonfox
Jan 14 2016 06:33
:wink:
gcnm-pgeil
@gcnm-pgeil
Jan 14 2016 09:00
Is there an official settlement on how a global SystemJS isntance is named? Because the configuration files genereated by JSPM use SystemJS(what was also told in documentations some months ago when I am not wrong) but systemjs and systemjs-builder both since recently use System. I am a little bit confused
Vlado Tesanovic
@vladotesanovic
Jan 14 2016 12:45
Can anyone, in short, explain to me: map vs paths?
Bnaya Peretz
@Bnaya
Jan 14 2016 15:08
map is to create alias for a spesific package
paths is to "rewrite" paths, that you can also use it for aliasing
rewrite as mod rewrite
@vladotesanovic ^
Vlado Tesanovic
@vladotesanovic
Jan 14 2016 16:28
@Bnaya Ok, tnx
Chris Smola
@Smolations
Jan 14 2016 16:45

let's say i have a dependency from github in my package file. and the directory structure looks something like:

packageA/
  dist/
    script.js
    script.shim.js
  package.json

the scripts themselves just need to be loaded into the browser, but export nothing. here's the rub: script.js depends on script.shim.js being loaded first. is there a way to make that happen in my config? i thought bundling might work, but wasn't sure if the deps array would recognize relative paths from the package folder...

Chris Smola
@Smolations
Jan 14 2016 16:57
and on another note, 0.17.0, which was described as a significant upgrade and released in june of last year, is still not available on npm (though there is a beta version or two). is there any particular reason why?
or maybe a more pressing question is, how soon will there be better parity between npm and the releases in the repo? :yum:
Chris Smola
@Smolations
Jan 14 2016 17:17
derp..either too early or too late and i'm worthless, lol. the latest jspm is indeed using the most recent loader...
     Using loader versions:
       systemjs@0.19.16
Chris Smola
@Smolations
Jan 14 2016 17:47
also, solved my issue that i posted about an hour ago, a few messages up. simple map config. sheesh. haha
Scott Smith
@scottadamsmith
Jan 14 2016 21:13
Anyone else have issues with Chrome not caching requests for JS files? I notice it is with xhr only. The system.js and config.js (using a script tag) both end up cached.
In FireFox, they appear to cache.
Also tried hitting enter in the browser to refresh as opposed to F5ing, same result.
Erik Anderson
@ebpa
Jan 14 2016 21:21
Can someone suggest a resource on approaches for troubleshooting inaccurate source maps?
By inaccurate I mean simply inaccurate source map alignment (mapping)
Simon Fox
@simonfox
Jan 14 2016 22:58
This message was deleted