These are chat archives for systemjs/systemjs

5th
Jun 2016
Garrick Cheung
@GCheung55
Jun 05 2016 03:51
Hello
I'm experimenting with SystemJS + ember-cli.
I'm not trying to bundle, but instead to generate depMap/depCache.
Is there a suggested way to include all files in a folder?
Garrick Cheung
@GCheung55
Jun 05 2016 04:44
Okay. Arithmetic ftw.
Garrick Cheung
@GCheung55
Jun 05 2016 06:23
Ember.js has a dep on jquery globally. So no explicit require/import of jquery. I've added jquery to Ember deps in my meta object but jquery isn't being loaded.
/* global System */

window.define = System.amdDefine;
window.require = window.requirejs = System.amdRequire;

System.defaultJSExtensions = true;

System.config({
  baseURL: '/assets/packages',

  // The files already transpiled, no need to transpile at run time.
  transpiler: false,

  map: {
    jquery: 'jquery/dist/jquery'
  },

  meta: {
    'ember-ci/app-boot': {
      format: 'global'
    },
    'ember': {
      format: 'global',
      exports: 'Ember',
      deps: ['jquery']
    },
    'jquery': {
      format: 'global',
      exports: 'jQuery'
    }
  },

  packages: {
    'ember': {
      main: 'ember.min'
    },

    'ember-load-initializers': {
      main: 'index'
    },

    'ember-resolver': {
      main: 'index'
    },

    'ember-computed-decorators': {
      main: 'index'
    },

    'ember-inflector': {
      main: 'index'
    },

    'moment': {
      main: 'index'
    }
  }
});
Maggie Pint
@maggiepint
Jun 05 2016 11:52
Don't know if there is anybody who wants to help with this in here, but I'm one of the Moment.js maintainers. Lately I've been getting a lot of inquiries about module loaders, and a few people claiming that Moment just 'doesn't work' with System.js. I'm sure this isn't true, as I think if it were true we would have more complaints. That being said, none of us are System.js users. If there is anybody here who was willing to add documentation to momentjs.com about how to load moment with System.js (in particular for the use case where some dependency needs moment to be global) I'd be very grateful. Also, if anybody has any feedback on moment/moment#3095 or any other issue with the 'loading' label, that would be awesome.
Guy Bedford
@guybedford
Jun 05 2016 13:16
@maggiepint sure I've answered the two issues that are jspm / SystemJS-specific. There does seem to be another Moment issue in https://github.com/systemjs/builder/issues/614#issuecomment-223463812, although I'm not completely sure what exactly that is yet but if it spills over into Moment's issue queue feel free to copy me in there too.
Maggie Pint
@maggiepint
Jun 05 2016 14:28
@guybedford thank you! I think I can do docs from what you put on 3101. Much appreciated. If you ever need anything from us let us know!
Vlado Tesanovic
@vladotesanovic
Jun 05 2016 14:57
Anyone get this error is already a bundle file, so can't be built as a module ? I am trying to bundle Angular 2 app ( with third party module, which is already bundled )