diff --git a/bower.json b/bower.json index 04f7bb5..96edab1 100644 --- a/bower.json +++ b/bower.json @@ -1,17 +1,18 @@ { - "name": "jsbandwidth", - "version": "1.1.1", - "description": "JsBandwidth - the JavaScript net speed test", - "author": "Adrian Ber", - "license": "MIT", - "homepage": "https://github.com/beradrian/jsbandwidth", - "main": "jsbandwidth.js", - "ignore": [ - "**/.*", - "node_modules", - "docs", - "Gruntfile.js", - "index.html", - "package.json" - ] -} + "name": "jsbandwidth", + "version": "1.1.2", + "description": "JsBandwidth - the JavaScript net speed test", + "author": "Adrian Ber", + "license": "MIT", + "homepage": "https://github.com/beradrian/jsbandwidth", + "main": "jsbandwidth.js", + "ignore": + [ + "**/.*", + "node_modules", + "docs", + "Gruntfile.js", + "index.html", + "package.json" + ] +} \ No newline at end of file diff --git a/package.json b/package.json index b701aa0..9ece59d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jsbandwidth", "license": "MIT", - "version": "1.1.1", + "version": "1.1.2", "description": "JsBandwidth - the JavaScript net speed test", "author": { @@ -15,11 +15,11 @@ "url": "https://github.com/beradrian/jsbandwidth.git" }, - "main": "jsbandwidth.js", + "main": "index.js", "dependencies": { - "extend": ">=3.0.0" - , "xhrpromise": ">=1.0.0" + "extend": "latest" + , "xhrpromise": "latest" }, "devDependencies": @@ -49,7 +49,7 @@ "scripts": { "browserify": "node_modules/.bin/browserify src/main/js/jsbandwidth.js -o jsbandwidth.js -t [ babelify --presets [ es2015 ] --plugins [ babel-plugin-add-module-exports ] uglifyify]", - "babel": "node_modules/.bin/babel src/main/js/jsbandwidth.js -o jsbandwidth.js --presets es2015 --plugins babel-plugin-add-module-exports", + "babel": "node_modules/.bin/babel src/main/js/jsbandwidth.js -o index.js --presets es2015 --plugins babel-plugin-add-module-exports", "prepublish": "npm run babel", "test": "node_modules/.bin/karma start src/test/karma.conf.js" } diff --git a/src/test/karma.conf.js b/src/test/karma.conf.js index e62cb1d..20a06b8 100644 --- a/src/test/karma.conf.js +++ b/src/test/karma.conf.js @@ -1,13 +1,14 @@ module.exports = function(config) { - config.set({ + var deps = "@(extend|xhrpromise)"; + var cfg = { basePath: '../..' , logLevel: 'DEBUG' , frameworks: ["jasmine-ajax", "jasmine", "commonjs"] , files: ["src/test/spec/*Spec.js", {pattern: "src/main/js/*.js", included: true}, - {pattern: "node_modules/extend/**/*.js", included: true, watched: false}, {pattern: "node_modules/extend/**/*", included: false, watched: false}] + {pattern: "node_modules/" + deps + "/*.js", included: true, watched: false}, + {pattern: "node_modules/" + deps + "/**/*", included: false, watched: false}] , preprocessors: { "**/*Spec.js": ["commonjs"] - , "node_modules/extend/**/*.js": ["commonjs"] , "src/main/js/*.js": ["babel", "commonjs"] } , browsers: ["Chrome", "Firefox"] @@ -22,5 +23,7 @@ module.exports = function(config) { , plugins: ["babel-plugin-add-module-exports"] } } - }); + }; + cfg.preprocessors["node_modules/" + deps + "/**/*.js"] = ["commonjs"]; + config.set(cfg); };