diff --git a/src/init.js b/src/init.js index 233a29b..d208f19 100644 --- a/src/init.js +++ b/src/init.js @@ -102,13 +102,13 @@ module.exports = function(files, basePath, jspm, client, emitter) { return packagesPath + fileName + '.js'; } } - + Array.prototype.unshift.apply(files, configPaths.map(function(configPath) { return createPattern(configPath) }) ); - + // Needed for JSPM 0.17 beta if(jspm.browser) { files.unshift(createPattern(browserPath)); @@ -139,7 +139,9 @@ module.exports = function(files, basePath, jspm, client, emitter) { // Allow Karma to serve all files within jspm_packages. // This allows jspm/SystemJS to load them - var jspmPattern = createServedPattern(packagesPath + '**/*', {nocache: jspm.cachePackages !== true}); + var jspmPattern = createServedPattern( + packagesPath + '!(system-polyfills.src.js|system.src.js)/**', {nocache: jspm.cachePackages !== true} + ); jspmPattern.watched = false; files.push(jspmPattern); }; diff --git a/test/testInit.spec.js b/test/testInit.spec.js index 91dfc45..591df16 100644 --- a/test/testInit.spec.js +++ b/test/testInit.spec.js @@ -74,7 +74,7 @@ describe('jspm plugin init', function(){ }); it('should use the configured jspm_packages path and include it at the end of the files array', function(){ - expect(normalPath(files[files.length - 1].pattern)).toEqual(normalPath(path.resolve(cwd, './custom_packages/**/*'))); + expect(normalPath(files[files.length - 1].pattern)).toEqual(normalPath(path.resolve(cwd, './custom_packages/!(system-polyfills.src.js|system.src.js)/**'))); expect(files[files.length - 1].included).toEqual(false); expect(files[files.length - 1].served).toEqual(true); expect(files[files.length - 1].watched).toEqual(false);