These are chat archives for systemjs/systemjs

5th
Jun 2015
Davis Kim
@davis
Jun 05 2015 00:41
how come i can do import m from 'marionette' but not import {ItemView} from 'marionette'?
Eric Eastwood
@MadLittleMods
Jun 05 2015 00:57
@davis marionette doesn't expose any named exports (guessing)
Davis Kim
@davis
Jun 05 2015 00:58
so the weird thing was that everything was working at some point
and now it's not :(
i was doing things like import {Model} from Backbone, too
Eric Eastwood
@MadLittleMods
Jun 05 2015 01:04
@davis I am reading through some issues like #334 now
Davis Kim
@davis
Jun 05 2015 01:04
i'm just so lost as to why it was working before and isn't now T_T
even in the docs:
Eric Eastwood
@MadLittleMods
Jun 05 2015 01:05
What version are you using?
Davis Kim
@davis
Jun 05 2015 01:06
0 15 6
Eric Eastwood
@MadLittleMods
Jun 05 2015 01:13
@davis I think named imports from non-ES6 modules only recently became supported: systemjs/systemjs#390
Davis Kim
@davis
Jun 05 2015 01:13
ok i'll try installing 0.17
this is just so weird,
it was working
using jspm 0.15.7
:( no dice
Davis Kim
@davis
Jun 05 2015 01:19
trying 0.16beta
Davis Kim
@davis
Jun 05 2015 01:28
someone save me :(
Davis Kim
@davis
Jun 05 2015 02:02
okay i am running the latest everything,
now i run into:
[Error: ENOENT, open '/Users/davis/workspace/searcher-fe/src/application/template.hbs.js'
    Error loading file:///Users/davis/workspace/searcher-fe/src/application/template.hbs.js from file:///Users/davis/workspace/searcher-fe/src/main.js
    Error loading file:///Users/davis/workspace/searcher-fe/src/application/template.hbs.js]
why is it trying to add .js to an hbs file?
i have this:
System.config({
  "meta": {
    "src/**/*.hbs": {
      "loader": "hbs"
    }
  }
});
Eric Eastwood
@MadLittleMods
Jun 05 2015 02:07
@davis I can't find any documentation on those meta loaders :/ - I don't want to steer you wrong. I have only used the loaders with the banged paths foo.hbs!
Davis Kim
@davis
Jun 05 2015 03:05
moving back to browserify :(
it was fun while it lasted
Rob Wormald
@robwormald
Jun 05 2015 04:00
so in terms of .js extensions should not be added automatically
does that mean in all es6 modules we should be doing import {Foo} from 'foo.js' going forward?
or does that only refer to System.import('foo.js')
Micah Zoltu
@MicahZoltu
Jun 05 2015 04:05
@robwormald I believe it has to do with the mapping. Though, I am curious to get an official answer.
If I am correct, you would still do import { Foo } from 'foo';, but in your config.js (or equivalent) you would have "foo": "path/to/foo.js".
Rob Wormald
@robwormald
Jun 05 2015 04:08
makes sense
Jonathan Liuti
@johnraz
Jun 05 2015 07:14
@davis I think you are giving up a bit quickly here :)
Guy Bedford
@guybedford
Jun 05 2015 08:29
@robwormald adding the js extension for everything except packages yes, that is internal code requires or subrequires
that is jquery/sub.js ./local.js and jquery or underscore plain
Rob Wormald
@robwormald
Jun 05 2015 08:42
@guybedford so re: jspm/registry#385 what do you reckon is the best way to output from angular2's ts source for jspm distribution?
the package config should make it easy, but does it make sense to go from TS -> register first? or a single file register bundle?
Guy Bedford
@guybedford
Jun 05 2015 09:32
@robwormald the best output for jspm distribution is separate js files as System.register
but distributing es6 is fine too
TS I mean
although that said, if there are custom compile options etc, it may make more sense as System.register
Elliot Smith
@townxelliot
Jun 05 2015 09:56
hello there; does anyone have any hints on how to do test coverage reporting for code using SystemJS?
Guy Bedford
@guybedford
Jun 05 2015 10:47
@townxelliot I don't know of anything, it sounds like a ripe area for contributions
Davis Kim
@davis
Jun 05 2015 19:07
if i were to start a new project right now
with jspm, and i wanted it to work with marionette, how would i go about that?
Guy Bedford
@guybedford
Jun 05 2015 19:08
Erik Johansson
@tozz
Jun 05 2015 20:10
Is there any plans towards adding support for auto hashing of files in systemjs? Including rewriting requires to point towards filenames with hashes in them (for caching purposes).
Davis Kim
@davis
Jun 05 2015 20:30
@guybedford should i be able to do import {Model} from 'backbone' using jspm@0.15.7
or do i need to do import Backbone from 'backbone'
Model = Backbone.Model
Davis Kim
@davis
Jun 05 2015 20:37
okay, so i can't do that
but i can do that in jspm @0.16.0-beta
Davis Kim
@davis
Jun 05 2015 20:46
and what should plugins output in 0.16.0-beta?
translate is a function that takes a load, and should modify the load.source and return undefined, correct?
the modified load.source should be a string - one that can be parsed as javascript
am i missing anything?
Davis Kim
@davis
Jun 05 2015 21:11
disregard :smile: plugins can't be written in es6
Davis Kim
@davis
Jun 05 2015 21:51
i finally got everything working again :)
and marionette is working with 0 shims or anything fancy