César Calvo
2017-03-14 f3f2452adb2723f2dde0b3429c282b835b5cdfcf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
 * System configuration for Angular samples
 * Adjust as necessary for your application needs.
 */
(function (global) {
  var ANGULAR_LIBS = ['core', 'http', 'common', 'compiler', 'material', 'flex-layout', //
                      'router', 'forms', 'platform-browser', 'platform-browser-dynamic', 'common'];
  var COVALENT_LIBS = ['core', 'http', 'dynamic-forms'];
  var mapping = {
    // our app is within the app folder
     main: 'src/main.js',
    'app': 'src/app',
    'environments': 'src/environments',
    // other libraries
    'rxjs': 'npm:rxjs',
    'ng2-toastr': 'npm:ng2-toastr',
    'angular-2-local-storage': 'npm:angular-2-local-storage/dist',
    'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js'
  }
  ANGULAR_LIBS.forEach(function (libName) {
    mapping['@angular/' + libName] = 'npm:@angular/' + libName + '/bundles/' + libName + '.umd.js';
  });
  COVALENT_LIBS.forEach(function (libName) {
    mapping['@covalent/' + libName] = 'npm:@covalent/' + libName + '/' + libName + '.umd.js';
  });
  System.config({
    paths: {
      // paths serve as alias
      'npm:': 'node_modules/',
    },
    map: mapping,
    packages: {
      'environments': {
        defaultExtension: 'js'
      },
      'app': {
        defaultExtension: 'js'
      },
      'rxjs': { main: 'index' },
      'angular-2-local-storage': { main: 'index', defaultExtension: 'js' },
      'ng2-toastr': { defaultExtension: 'js' }
    }
  });
})(this);