diff --git a/lib/bundle.js b/lib/bundle.js index 14ec3b645..1c5701e3b 100644 --- a/lib/bundle.js +++ b/lib/bundle.js @@ -23,21 +23,23 @@ var extend = require('./common').extend; var alphabetize = require('./common').alphabetize; var toFileURL = require('./common').toFileURL; +// jspm version of builder ignores config, baseURL arguments +// just allows cfg object function Builder(_config) { config.loadSync(); + SystemJSBuilder.call(this, toFileURL(config.pjson.baseURL)); var cfg = config.loader.getConfig(); - cfg.baseURL = toFileURL(config.pjson.baseURL); - - if (_config) - extend(cfg, _config); if (cfg.depCache) delete cfg.depCache; if (cfg.bundles) delete cfg.bundles; - SystemJSBuilder.call(this, cfg); + this.config(cfg); + + if (typeof _config == 'object') + this.config(_config); } Builder.prototype = Object.create(SystemJSBuilder.prototype); exports.Builder = Builder; diff --git a/testlibs/config.js b/testlibs/config.js index 21034c361..294c3ce6a 100644 --- a/testlibs/config.js +++ b/testlibs/config.js @@ -10,6 +10,182 @@ System.config({ "github:*": "jspm_packages/github/*", "npm:*": "jspm_packages/npm/*" }, + bundles: { + "build.js": [ + "npm:voxel-demo@0.0.1", + "npm:voxel-demo@0.0.1/shader", + "npm:gl-now@0.0.4", + "npm:gl-tile-map@0.3.0", + "npm:gl-buffer@0.1.2", + "npm:gl-matrix@2.0.0", + "npm:gl-vao@0.0.3", + "npm:ndarray@1.0.16", + "npm:ndarray-fill@0.1.0", + "npm:ndarray-ops@1.1.1", + "npm:ao-mesher@0.2.10", + "npm:ao-shader@0.2.3", + "npm:gl-now@0.0.4/index", + "npm:gl-tile-map@0.3.0/tilemap", + "npm:gl-buffer@0.1.2/buffer", + "npm:gl-vao@0.0.3/vao", + "npm:gl-matrix@2.0.0/dist/gl-matrix", + "npm:ndarray@1.0.16/ndarray", + "npm:ndarray-fill@0.1.0/index", + "npm:ndarray-ops@1.1.1/ndarray-ops", + "npm:ao-mesher@0.2.10/mesh", + "npm:ao-shader@0.2.3/aoshader", + "npm:game-shell@0.1.4", + "npm:webglew@0.0.0", + "npm:tile-mip-map@0.2.1", + "npm:gl-texture2d@0.1.12", + "npm:typedarray-pool@0.1.2", + "npm:gl-vao@0.0.3/lib/vao-native", + "npm:gl-vao@0.0.3/lib/vao-emulated", + "npm:iota-array@1.0.0", + "github:jspm/nodelibs-buffer@0.1.0", + "npm:cwise@0.3.4", + "npm:cwise-compiler@0.0.0", + "npm:cwise-compiler@0.1.0", + "npm:greedy-mesher@1.0.2", + "github:jspm/nodelibs-fs@0.1.2", + "npm:gl-shader@0.0.6", + "npm:tile-mip-map@0.2.1/mipmap", + "npm:webglew@0.0.0/webglew", + "npm:game-shell@0.1.4/shell", + "npm:typedarray-pool@0.1.2/pool", + "npm:gl-vao@0.0.3/lib/do-bind", + "npm:gl-texture2d@0.1.12/texture", + "npm:iota-array@1.0.0/iota", + "github:jspm/nodelibs-buffer@0.1.0/index", + "npm:cwise@0.3.4/cwise", + "npm:cwise-compiler@0.0.0/compiler", + "npm:cwise-compiler@0.1.0/compiler", + "npm:greedy-mesher@1.0.2/greedy", + "github:jspm/nodelibs-fs@0.1.2/index", + "npm:gl-shader@0.0.6/index", + "npm:ndarray-downsample2x@0.1.1", + "github:jspm/nodelibs-events@0.1.1", + "github:jspm/nodelibs-util@0.1.0", + "npm:domready@0.2.13", + "npm:vkey@0.0.3", + "npm:invert-hash@0.0.0", + "npm:uniq@0.0.2", + "npm:lower-bound@0.0.3", + "npm:iota-array@0.0.1", + "npm:game-shell@0.1.4/lib/raf-polyfill", + "npm:game-shell@0.1.4/lib/mousewheel-polyfill", + "npm:game-shell@0.1.4/lib/hrtime-polyfill", + "npm:bit-twiddle@0.0.2", + "npm:dup@0.0.0", + "npm:typedarray-pool@1.1.0", + "npm:buffer@3.4.2", + "npm:cwise-parser@0.0.1", + "npm:cwise-compiler@0.0.0/lib/thunk", + "npm:cwise-compiler@0.1.0/lib/thunk", + "npm:uniq@1.0.1", + "npm:glsl-exports@0.0.0", + "npm:ndarray-downsample2x@0.1.1/downsample", + "github:jspm/nodelibs-util@0.1.0/index", + "github:jspm/nodelibs-events@0.1.1/index", + "npm:domready@0.2.13/ready", + "npm:vkey@0.0.3/index", + "npm:invert-hash@0.0.0/invert", + "npm:lower-bound@0.0.3/lb", + "npm:uniq@0.0.2/uniq", + "npm:dup@0.0.0/dup", + "npm:iota-array@0.0.1/iota", + "npm:bit-twiddle@0.0.2/twiddle", + "npm:typedarray-pool@1.1.0/pool", + "npm:buffer@3.4.2/index", + "npm:cwise-parser@0.0.1/index", + "npm:cwise-compiler@0.0.0/lib/compile", + "npm:cwise-compiler@0.1.0/lib/compile", + "npm:uniq@1.0.1/uniq", + "npm:glsl-exports@0.0.0/index", + "npm:util@0.10.3", + "npm:ndarray-fft@0.1.0", + "npm:ndarray-scratch@0.0.1", + "npm:events@1.0.2", + "github:jspm/nodelibs-process@0.1.1", + "npm:bit-twiddle@1.0.2", + "npm:base64-js@0.0.8", + "npm:dup@1.0.0", + "npm:ieee754@1.1.6", + "npm:is-array@1.0.1", + "npm:esprima@1.0.4", + "npm:glsl-tokenizer@0.0.9", + "npm:glsl-parser@0.0.9", + "npm:through@2.3.7", + "npm:util@0.10.3/util", + "npm:ndarray-fft@0.1.0/fft", + "npm:ndarray-scratch@0.0.1/scratch", + "npm:events@1.0.2/events", + "github:jspm/nodelibs-process@0.1.1/index", + "npm:bit-twiddle@1.0.2/twiddle", + "npm:base64-js@0.0.8/lib/b64", + "npm:dup@1.0.0/dup", + "npm:ieee754@1.1.6/index", + "npm:is-array@1.0.1/index", + "npm:esprima@1.0.4/esprima", + "npm:glsl-tokenizer@0.0.9/index", + "npm:glsl-parser@0.0.9/index", + "npm:through@2.3.7/index", + "npm:inherits@2.0.1", + "npm:ndarray-fft@0.1.0/lib/fft-matrix", + "npm:util@0.10.3/support/isBufferBrowser", + "npm:process@0.10.1", + "npm:glsl-tokenizer@0.0.9/lib/operators", + "npm:glsl-tokenizer@0.0.9/lib/literals", + "npm:glsl-tokenizer@0.0.9/lib/builtins", + "github:jspm/nodelibs-stream@0.1.0", + "npm:glsl-parser@0.0.9/lib/index", + "npm:process@0.10.1/browser", + "github:jspm/nodelibs-stream@0.1.0/index", + "npm:inherits@2.0.1/inherits_browser", + "npm:through@1.1.2", + "npm:glsl-parser@0.0.9/lib/scope", + "npm:glsl-parser@0.0.9/lib/expr", + "npm:stream-browserify@1.0.0", + "npm:through@1.1.2/index", + "npm:stream-browserify@1.0.0/index", + "npm:readable-stream@1.1.13/writable", + "npm:readable-stream@1.1.13/readable", + "npm:readable-stream@1.1.13/duplex", + "npm:readable-stream@1.1.13/transform", + "npm:readable-stream@1.1.13/passthrough", + "npm:readable-stream@1.1.13/lib/_stream_writable", + "npm:readable-stream@1.1.13/lib/_stream_readable", + "npm:readable-stream@1.1.13/lib/_stream_duplex", + "npm:readable-stream@1.1.13/lib/_stream_transform", + "npm:readable-stream@1.1.13/lib/_stream_passthrough", + "npm:core-util-is@1.0.1", + "npm:isarray@0.0.1", + "npm:string_decoder@0.10.31", + "npm:core-util-is@1.0.1/lib/util", + "npm:isarray@0.0.1/index", + "npm:string_decoder@0.10.31/index", + "main.js", + "npm:mocha@1.21.5", + "tests/tests.js", + "tests/bootstrap.js", + "tests/angular.js", + "tests/jquery.js", + "tests/d3.js", + "tests/voxel-demo.js", + "npm:mocha@1.21.5/mocha", + "github:twbs/bootstrap@3.3.4", + "github:angular/bower-angular@1.3.15", + "github:components/jquery@2.1.4", + "github:mbostock/d3@3.5.5", + "github:twbs/bootstrap@3.3.4/js/bootstrap", + "github:twbs/bootstrap@3.3.4/css/bootstrap.css!github:systemjs/plugin-css@master", + "npm:mocha@1.21.5/mocha.css!github:systemjs/plugin-css@master", + "github:components/jquery@2.1.4/jquery", + "github:mbostock/d3@3.5.5/d3", + "github:angular/bower-angular@1.3.15/angular", + "tests/bootstrap.html!github:systemjs/plugin-text@0.0.2" + ] + }, map: { "angular": "github:angular/bower-angular@1.3.15",