Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Fairbanks committed Jan 19, 2015
0 parents commit a4ddcc6
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/adapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(function(karma) {
karma.loaded = function() {};
})(window.__karma__);
17 changes: 17 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var createPattern = function(path) {
return {pattern: path, included: true, served: true, watched: false};
};

var initSystemJs = function(files) {
var es6ModuleLoaderPath = require('path').dirname(require.resolve('es6-module-loader')) + '/../dist/es6-module-loader.src.js';
var systemjsPath = require.resolve('systemjs');
files.unshift(createPattern(__dirname + '/adapter.js'));
files.unshift(createPattern(systemjsPath));
files.unshift(createPattern(es6ModuleLoaderPath));
};

initSystemJs.$inject = ['config.files'];

module.exports = {
'framework:systemjs': ['factory', initSystemJs]
};
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "karma-systemjs",
"version": "0.0.1",
"description": "A Karma plugin. Adapter for SystemJS framework.",
"main": "lib/index.js",
"author": "",
"license": "MIT",
"dependencies": {
"es6-module-loader": "^0.11.2",
"systemjs": "^0.11.2"
}
}

0 comments on commit a4ddcc6

Please sign in to comment.