These are chat archives for systemjs/systemjs

20th
May 2015
Dominic Chambers
@dchambers
May 20 2015 07:03
@guybedford, I'm planning to start implementing MockableSystemJS quite soon so that brjs can switch over to SystemJS as it's bundling format, but I'm hoping it'll be useful more widely, and therefore any feedback would be really helpful.
If you don't like the name, or anything else about it, just let me know.
Dominic Chambers
@dchambers
May 20 2015 09:44
Anybody know if there is an easy way to test JSPM locally without deploying dependent projects to NPM or GitHub? I tried file: but I got the error err Registry file not found..
Guy Bedford
@guybedford
May 20 2015 10:25
@dchambers you can try using linking workflows here
Dominic Chambers
@dchambers
May 20 2015 12:18
Nice feature, I didn't know about linking. Unfortunately that didn't work too well for me because the dependency I linked to also depends on more local dependencies using file: in the pacakge.json, and jspm assumes these are github specifiers, and fails to import.
Guy Bedford
@guybedford
May 20 2015 12:18
@dchambers yes all dependencies need to be in the standard jspm format
Dominic Chambers
@dchambers
May 20 2015 12:18
Nevermind, I'm just going to have to push everything to Github and work like that...
Guy Bedford
@guybedford
May 20 2015 12:18
you can alias things
Nelo Mitranim
@Mitranim
May 20 2015 12:19
just link them locally
Dominic Chambers
@dchambers
May 20 2015 12:19
Standard JSPM format, but it's an NPM dependency.
Guy Bedford
@guybedford
May 20 2015 12:19
jspm:local-package1, jspm:local-package2
etc etc
Dominic Chambers
@dchambers
May 20 2015 12:19
Ah, I can link the transitive deps too?
Guy Bedford
@guybedford
May 20 2015 12:19
npm dependencies are just npm:...
you need to have already linked them in manually
Dominic Chambers
@dchambers
May 20 2015 12:19
Okay, I'll give that a try, thanks.
Guy Bedford
@guybedford
May 20 2015 12:19
but if it's linked and exists, then it will use it during transitive resolution
Dominic Chambers
@dchambers
May 20 2015 12:20
Lovely, thanks again :+1:
Glen Huang
@hgl
May 20 2015 12:46
Is it possible to map files deeply? For example, System.map["test/unit"] = { "module": { "module-dep": "another-module" }}? I'm trying to swap out a module's deps when doing unit testing.
Dominic Chambers
@dchambers
May 20 2015 12:51
@guybedord, I got linking to work as you described, and I can see that it offers unique capabilities due the to the fact it makes it possible to change transitive dependencies, and since it allows you to make changes without affecting the source code. But on the other hand, I found links a lot harder to setup then just using file:, and the fact they can't be checked in is actually a bad thing in my case since there is no real NPM dependency I'm temporarilly replacing.
However, the fact you have to run two separate commands (jspm link and jspm install --link) every time you make a change is the biggest downside for me when compared with using a file: specifier.
I'm guessing there are probably technical reasons for all of this, but if not then file: support might be a handy 'nice to have' feature?
Nelo Mitranim
@Mitranim
May 20 2015 12:54
you don't actually have to reinstall, just relink (unless the version changes)
this could be made part of a build pipeline for each of those dependencies
You can also manually link the folder to avoid having to do that
agreed that it's less convenient than with npm or bower
Guy Bedford
@guybedford
May 20 2015 13:10
yes linking will be improved, it's very much in the early stages of the workflow
Dominic Chambers
@dchambers
May 20 2015 13:11
@Mitranim , yes thanks for the clarification there, you are quite right about only having to do that if the version changes. Very nice to know!
Glen Huang
@hgl
May 20 2015 13:12
@guybedford possible to swap out an imported module's deps in the config? I tried System.map["test/unit"] = { "module": { "module-dep": "another-module" }} with no luck.
Dominic Chambers
@dchambers
May 20 2015 13:12
Okay, thanks @guybedford, don't want to moan as I actually think the whole JSPM / System JS / ES6 Module Loader stack is really great work.
Guy Bedford
@guybedford
May 20 2015 13:21
yeah it's certainly still got rough edges, but it's just a matter of time to smooth things out. My main priority is just not to burn out or run out of cash before such a point :)
Dominic Chambers
@dchambers
May 20 2015 13:22
Are you working on this full time then? If so, achieving both of your goals sounds like quite the dichotomy!
Nelo Mitranim
@Mitranim
May 20 2015 13:28
Wow, so you're doing this on your own? That's even more impressive
I thought companies invested into the future of the web like Google would consider it in their interest to support this work
Guy Bedford
@guybedford
May 20 2015 13:29
yeah haven't had any support so far, but needing to start looking at options now
have put together a maintenance contract for the projects - support guarantees etc
if anyone is interested do let me know
Glen Huang
@hgl
May 20 2015 13:32
I thought you were sponsored. Your are so amazing for working on the whole stack this long!
Stealjs is quite similar to jspm if I'm not wrong? and bitovi is behind it? possible to work with them?
Guy Bedford
@guybedford
May 20 2015 13:35
Have had some sponsorships from some consulting for companies using the software - including GoCardless and Workiva.
"sponsorship" as a model is hard to sell though
that's why I'm pushing for maintenance contracts currently
worst case will have to do some kind of fundraiser towards the end of the year
Glen Huang
@hgl
May 20 2015 13:38
what about things like paid service for private packages?
Dominic Chambers
@dchambers
May 20 2015 13:38
Wow, props to you @guybedford! Your certainly now in a position to find a plum JavaScript position, and would of thought it would be possible to find one that was willing to sponsor you part time too.
What is a maintenance contract exactly?
Not heard that term before?
Glen Huang
@hgl
May 20 2015 13:39
yeah, I would like to ask too.
never heard of maintenance contracts
Dave Ackerman
@dmackerman
May 20 2015 13:39
@guybedford you should start a patreon or gofundme.
Guy Bedford
@guybedford
May 20 2015 13:39
so basically a monthly amount for priority support and bug fixes, guarantees on response times and hotfix release dates
for companies wanting to be sure that the software will work
@dmackerman yes, that will be the last resort, but best case scenario it covers 6 months of dev, so trying to structure something more sustainable first
Dominic Chambers
@dchambers
May 20 2015 13:41
Ah okay, the only problem with that is find the people and all the admin you'll end up having to do. I would have thought a job with a larger company willing to let you work on this part time in exchange for you knowledge would be an easier sell, ... but then I don't actually know.
Guy Bedford
@guybedford
May 20 2015 13:41
priorised feature requests etc etc, basically like a really high priority level of support
have yet to find such an offer, but yeah that would be ideal
it's a lot of work though, a day a week doesn't even cut it
very few companies want to invest more than that
Dominic Chambers
@dchambers
May 20 2015 13:42
Yeah, you'd need 50/50 min.
Guy Bedford
@guybedford
May 20 2015 13:43
yeah that would work
Dominic Chambers
@dchambers
May 20 2015 13:46
In theory, would you be interested in a couple of weeks of consultancy work? I can't actually promise, and would need to get it confirmed, but my company would benefit greatly by somebody with your knowledge and smarts.
Oh, I'm available at dominic.chambers@caplin.com if you'd prefer to discuss privately.
Guy Bedford
@guybedford
May 20 2015 13:51
can certainly discuss - right now these next two SystemJS & jspm releases are pretty critical to stabilize the apis
so trying to push them out over the next month or so
but may well be available after that
Dominic Chambers
@dchambers
May 20 2015 13:53
Cool, would love to hear from you, and am sure you'll get loads of other offers once more people know.
Nelo Mitranim
@Mitranim
May 20 2015 13:57
Let's make sure more people know :)
Dominic Chambers
@dchambers
May 20 2015 13:58
:+1:
Jami Pekkanen
@jampekka
May 20 2015 15:08
Hello. Is there a way to use plugins using "require" with SystemJS? Eg. in a module do var Module = require("Module.coffee") and it would transparently transpile the script? I see that it should be possible to do System.import("Module.coffee!") using a plugin, but I'm a bit confused on the difference between System.import and require
I'm currently using webpack with such syntax and it would be nice if I could switch to SystemJS without changing the code
Guy Bedford
@guybedford
May 20 2015 15:14
@jampekka this would need to be require("module.coffee!") in the code at the moment unfortunately
in the coming release we will support this without the ! needing to be in the source though
Jami Pekkanen
@jampekka
May 20 2015 15:14
OK, I could live with that
Guy Bedford
@guybedford
May 20 2015 15:14
with some luck that release will be within the next week or so though
Jami Pekkanen
@jampekka
May 20 2015 15:14
Oh, and can I use npm/github packages without jspm?
Guy Bedford
@guybedford
May 20 2015 15:15
yes sure, but dependencies won't resolve easily unfortunately as we do not assume Node-style module resolution in SystemJS
Jami Pekkanen
@jampekka
May 20 2015 15:16
Meaning npm packages with dependencies wouldn't work?
Jami Pekkanen
@jampekka
May 20 2015 15:37
Also can't seem to get packages working with jspm. First impression is that I'll have to stick with webpack :(
Matthew Phillips
@matthewp
May 20 2015 18:15
Is there an old issue or something that discusses the advantages of System.register over AMD?
I'm sure it was discussed and I just missed it.
Guy Bedford
@guybedford
May 20 2015 18:36
@matthewp it's purely about circular references and binding behaviours, which AMD doesn't capture
Matthew Phillips
@matthewp
May 20 2015 18:36
amd doesn't support circular references?
Guy Bedford
@guybedford
May 20 2015 18:37
it does, but not in the same way as ES6 circular references
Matthew Phillips
@matthewp
May 20 2015 18:37
what is the difference?
Guy Bedford
@guybedford
May 20 2015 18:40
functions work regardless of circular reference execution order (that is an exported function can be called even before the module has executed), and bindings are live in the exports, and even transitively through re-export boundaries
Guy Bedford
@guybedford
May 20 2015 18:41
yeah I assumed you'd read that
Matthew Phillips
@matthewp
May 20 2015 18:41
it's been a little while
thanks
Guy Bedford
@guybedford
May 20 2015 18:41
sure
Matthew Phillips
@matthewp
May 20 2015 19:00
yeah the zebra striping algorithm is the one part of systemjs i don't understand
i didn't realize the spec has execution order