These are chat archives for systemjs/systemjs

10th
Mar 2016
Thomas Sieverding
@Bajix
Mar 10 2016 00:28
So I’m trying to accomplish some tricky building of templates that involves module substitution. Essentially, I need to build the templates with virtual dom stubbed via config, then reset config, and then do a normal build using the cached & translated templates
Is there a way to use the SystemJS builder to translate using a plugin without bundling dependencies?
Guy Bedford
@guybedford
Mar 10 2016 07:24
@Bajix did you have a look at builder.compile?
Thomas Sieverding
@Bajix
Mar 10 2016 08:26
No
How does compile differ from bundle?
Thomas Sieverding
@Bajix
Mar 10 2016 08:54
I need to be able to use config to override dependencies, build my templates w/ plugins, reset the overrides, and then build my project w/ the cached templates. How does compile fit into that?
BoeseB
@BoeseB
Mar 10 2016 09:25
Is systemjs able to load "*.node" files via require()?
Guy Bedford
@guybedford
Mar 10 2016 10:51
@BoeseB this is being tracked in systemjs/systemjs#1052
@Bajix I'd highly recommend looking at builder.compile for separate file compilations
it is the 1-1 file build, without bundling
templates compile etc etc, but you retain the simplicity of a direct build system from an input to an output
config is designed to be global for a project. The idea of "swapping" config should be avoided unless you're doing unit testing
builder instances provide that isolation naturally though
BoeseB
@BoeseB
Mar 10 2016 10:56
@guybedford i try to get edgeJS running but have tjanczuk/edge#400 thats why i asked. Is what edge does ( require(./native/win32/x64/5.1.0/edge_nativeclr)) where edge_nativeclr has file ending *.node just impossible or did i miss somethin else? Would be happy if you could lead me in the right direction =)
Guy Bedford
@guybedford
Mar 10 2016 11:15
@BoeseB best to consider it not possible currently, until that issue is resolved
BoeseB
@BoeseB
Mar 10 2016 11:48
@guybedford ok, thanks
Vojtech Polivka
@vojtapol
Mar 10 2016 15:02
@guybedford SystemJS throws Unexpected token error on this line import ui.bootstrap from 'angular-ui-bootstrap';
Is the dot a problem? Thats how the module exports it, I can't do much about that.
Guy Bedford
@guybedford
Mar 10 2016 16:43
@vojtapol try import {bootstrap} from 'angular-ui-bootstrap' or maybe import ui from 'angular-ui-bootstrap'. I'd also suggest reading an introduction to ES modules syntax if you can.
Vojtech Polivka
@vojtapol
Mar 10 2016 16:43
@guybedford I definitely should read up on that and thank you very much
Abide Masaraure
@abidmix
Mar 10 2016 18:11

I am tying to import Subject and Observable in Visual Studio. I can drill down to the definitions no problem.

              ```
              import {Observable, Subject} from  'node_modules/rxjs/Rx';
            ```

But on running the app, I get an error when trying to instantiate a new subject. Rx_1.Subject is not a function. Has any one using VS as their editor and SytemJS getting encountered this error before. My code already works in a plunk.

Daphne Maddox
@laurelnaiad
Mar 10 2016 18:43
Greetings, room. In my typescript project, pretranspiled using no tranpsiler in systemjs, what might I probably be doing wrong if I’m having trouble accessing index.js files as default? When I refer to ‘abc/xyz/pdq’, and I really mean ‘abc/xyz/pdq/index.js', what would I have had to do in system config to make it so? I have a feeling this has to do with defaultJSExtensions: true,, but I’m not sure. Or maybe what I want isn’t even the way it works?
When I ask for 'abc/xyz/pdq' it looks for ‘abc/xyz/pdq.js’.
I get this sense that since tsc doesn’t want to see extensions, and the way to handle that in SystemJS is to default them, that I’m kinda sstuck with that setting. Or am I wrong about that?
Thomas Sieverding
@Bajix
Mar 10 2016 23:10
Can systemjs-builder/lib/arithmetic traverseTree be used without a main dependency? I’m using it in a glob-like fashion