Загрузка модулей в браузер с помощью интернета - PullRequest
0 голосов
/ 24 октября 2019

Мне было интересно, есть ли способ загрузить модули в браузер как шаблоны в файле конфигурации intern, как это делает карма? Загрузка файла кармы работает следующим образом: http://karma -runner.github.io / 4.0 / config / files.html пример ниже:

files: [

  // Detailed pattern to include a file. Similarly other options can be used
  { pattern: 'lib/angular.js', watched: false },
  // Prefer to have watched false for library files. No need to watch them for changes

  // simple pattern to load the needed testfiles
  // equal to {pattern: 'test/unit/*.spec.js', watched: true, served: true, included: true}
  'test/unit/*.spec.js',

  // this file gets served but will be ignored by the watcher
  // note if html2js preprocessor is active, reference as `window.__html__['compiled/index.html']`
  {pattern: 'compiled/index.html', watched: false},

  // this file only gets watched and is otherwise ignored
  {pattern: 'app/index.html', included: false, served: false},

  // this file will be served on demand from disk and will be ignored by the watcher
  {pattern: 'compiled/app.js.map', included: false, served: true, watched: false, nocache: true}
],

Я хочу реализовать нечто подобное в моемфайл intern.json, особенно через шаблоны, потому что у меня есть тонна файлов, и я не хочу загружать их по отдельности. Любое понимание поможет.

...