These are chat archives for systemjs/systemjs

25th
May 2016
Zeeshan Jan
@zeeshanjan82
May 25 2016 05:12
Hi @all I have a question, I am currently working on an angular2 app using system.js, I would like to add jquery and twitter bootstrap as the dependency inside system.js for the angular2 app so that I don't have to manully add them in the index.html file
can anyone let me know how i can do that?
Ciel
@ciel
May 25 2016 07:45
Hey guys, was hoping I could get some help. I'm trying to transpile typescript and am having a difficult time setting up two different packages to do it. I've got one that works, and it is defined like this;
This message was deleted
System.config({
    transpiler: "typescript",
    defaultJSExtensions: true,
    map: {
        // ... other maps ... //
    },
    meta: {
        // .. other metas .. //
        'js/*': {
            deps: ['jquery', 'json', 'typescript', 'angular']
        }
    },
    paths: {
        // .. other packages .. //
        'js/*'          : 'js/*.ts',
    },
    packages: {
        'js':{
            'defaultExtension': 'ts'
        }
    }
});

Promise.all([
    // ... other imports ... //
    System.import('js/main')
]).then(function () {
    $('.spinner-container').fadeOut(800); angular.bootstrap(document, ['ehrpg']);
});
It works great. So I try to add another one
System.config({
    transpiler: "typescript",
    defaultJSExtensions: true,
    map: {
        // ... other maps ... //
    },
    meta: {
        // .. other metas .. //
        'js/*': {
            deps: ['jquery', 'json', 'typescript', 'angular']
        },
        'lib/*': {
            deps: ['jquery', 'json', 'typescript', 'angular']
        }
    },
    paths: {
        // .. other packages .. //
        'js/*'          : 'js/*.ts',
        'lib/*'         : 'lib/*.ts'
    },
    packages: {
        'js':{
            'defaultExtension': 'ts'
        },
        'lib':{
            'defaultExtension': 'ts'
        }
    }
});

Promise.all([
    // ... other imports ... //
    System.import('js/main')
]).then(function () {
    $('.spinner-container').fadeOut(800); angular.bootstrap(document, ['ehrpg']);
});
and that one doesn't work. it keeps trying to use the *.js extension.
Mark Perry
@MarkPerryBV
May 25 2016 10:15
Anyone up for an easy question?
carlosagsmendes
@carlosagsmendes
May 25 2016 10:22
:)
Andrew Stoker
@AStoker
May 25 2016 13:25
@MarkPerryBV... Depends on how easy the question is ;)
@miha- It sounds like maybe you're using decorators (syntax with @). You need to make sure that your transpiler (babel for example) has the right plugins set up to read decorator syntax (something that is a part of ES7)
Mark Perry
@MarkPerryBV
May 25 2016 14:35
@AStoker U still here bud?
Andrew Stoker
@AStoker
May 25 2016 14:59
I pop in on occasion :) If I get tagged directly, I'll usually see messages faster
Mark Perry
@MarkPerryBV
May 25 2016 15:18
@AStoker I figured it out eventually but thanks for responding. It was an Angular2 bundling question. I was using the umd files instead of the index ones
Jami Pekkanen
@jampekka
May 25 2016 15:30
There seems to be a difference on how plugins are normalized in the builder and in the browser. I have a custom normalizer and when I load eg "somestuff.txt!text", the plugin path is just "text" in browser, but an url "file:///project/root/text" in the builder
And this of course causes problems as I have text: "systemjs-text" in map-config
Jami Pekkanen
@jampekka
May 25 2016 19:19
Hmm.. is the only way to include text with system-text-plugin by overriding it having a bundle-hook?