MCPcopy Create free account
hub / github.com/socketstream/socketstream / systemModule

Function systemModule

lib/client/bundler/proto.js:192–222  ·  view source on GitHub ↗

* @ngdoc method * @name bundler.default:default#system * @methodOf bundler.default:default * @function * @description * Return entries for the loader/start/module depending on includes.system client config and system assets. * Multiple arguments will attempt to add module for the n

(/* first_name */)

Source from the content-addressed store, hash-verified

190 * @returns {AssetEntry} Resource entries array
191 */
192 function systemModule(/* first_name */) {
193 var entries = [],
194 // jshint validthis:true
195 client = this.client;
196
197 /*jshint -W084 */
198 for(var i= 0,name; name = arguments[i]; ++i) {
199 switch(name) {
200 case 'loader':
201 entries.push(ss.bundler.browserifyLoader());
202 break;
203 case 'libs':
204 entries.push(ss.bundler.systemLibs());
205 break;
206 case 'start':
207 entries = entries.concat(ss.bundler.constants(client));
208 if (client.includes.initCode) {
209 entries = entries.concat(ss.bundler.startCode(client));
210 }
211 break;
212
213 //case "eventemitter2":
214 //case "socketstream":
215 default:
216 entries.push(ss.bundler.systemModule(name));
217 break;
218 }
219 }
220
221 return entries;
222 }
223
224 function constants() {
225 var result = {}, k;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected