These are chat archives for systemjs/systemjs

21st
Nov 2016
λex Vincent
@alexisvincent
Nov 21 2016 07:05
Once
If you want something that runs many times, export a function and run that
bkh
@bkh2js
Nov 21 2016 10:21
Dos anybody knows how I can add the barrels to the system.config.js
??
@bastiankhalil
Dos anybody knows how I can add the barrels to the system.config.js
??
bkh
@bkh2js
Nov 21 2016 10:36
------------------- please!
Jiri Spac
@capaj
Nov 21 2016 10:37
@bastiankhalil what do you mean by "barrels"?
bkh
@bkh2js
Nov 21 2016 10:37
I mean my component paths
I want to include them by folder where the default is index.js
@capaj get my idea?
bkh
@bkh2js
Nov 21 2016 10:43
code

 packages = {};
   var subPackageNames  = [
    'app',
    'app/+login',
    'app/+inbox',
    'app/+password-restore',
    'app/+sign-up',
    'app/details',
    'app/todo-sub',
    "environments"
  ];

  function packIndex(pkgName, baseName) {
    packages[baseName+pkgName] = { main: 'index.js', defaultExtension: 'js' };
  }

  subPackageNames.forEach(function (name){
    packIndex(name, 'app/');
  });


  System.config({
    packages: packages
  });
bkh
@bkh2js
Nov 21 2016 13:02
??
Owen Densmore
@backspaces
Nov 21 2016 16:55
@alexisvincent Thanks, that's good news .. I'm using three.js and they have a global object into which they directly add "plugins". It turns out importing them via "empty imports" works, if I use a <script> tag for three.js itself, making it global.
Bruno Baketaric
@bbak
Nov 21 2016 21:05
Does anyone know a gulp plugin that REALLY supports the inject option when bundling with systemjs/builder? Neither of these do, even though some pretend to: gulp-jspm, gulp-jspm-build, gulp-systemjs-builder.
Peter Müller
@Munter
Nov 21 2016 21:41
@bbak Wasn't it a policy of Gulp not to write plugins that simply wrap non-streaming tools in a streaming wrapper? This is such a case. I would recommend you just use the command line tool directly
Bruno Baketaric
@bbak
Nov 21 2016 22:00
@Munter Hm, may be. Obviously that policy is not enforced (anymore), since there are some plugins available. Yet they seem to be of questionable quality.
Either way, I'd prefer to have the possibility to .pipe() the results of an in-Memory Build to whatever I want to. IMHO JSPM/Systemjs adoption also depends on the availability and quality of plugins into existing build-systems.
Peter Müller
@Munter
Nov 21 2016 22:01
I really hate all these wrappers that hide away access to configuration of the real tool under the hood
Grunt plugins had exactly the same problem
Bruno Baketaric
@bbak
Nov 21 2016 22:15
That's a matter of the quality of the plugin. Writing software is all about adding levels of abstraction. Hiding complicatedness of an underlying tool is an important part of that.