Browse Source

fix up pkg for running benchmarks and tests

Kyle P Davis 10 years ago
parent
commit
caa5ec81cb
6 changed files with 10 additions and 12 deletions
  1. 4 0
      benchmarksman.js
  2. 0 3
      index.js
  3. 1 1
      lib/index.js
  4. 1 3
      main.js
  5. 4 4
      package.json
  6. 0 1
      test/mocha.opts

+ 4 - 0
benchmarksman.js

@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+"use strict";
+module.exports = require("./lib/");
+if (!module.parent) require("./main")();

+ 0 - 3
index.js

@@ -1,3 +0,0 @@
-"use strict";
-module.exports = require("./lib");
-if (!module.parent) require("./main")();

+ 1 - 1
lib/index.js

@@ -1,5 +1,5 @@
 "use strict";
 module.exports = {
 	reporter: require("./reporter"),
-	runner: require("./runner")
+	runner: require("./runner"),
 };

+ 1 - 3
main.js

@@ -1,7 +1,5 @@
-#!/usr/bin/env node
 "use strict";
-
-var lib = require("./lib"),
+var lib = require("./lib/"),
 	runner = lib.runner;
 
 /**

+ 4 - 4
package.json

@@ -2,13 +2,13 @@
   "name": "benchmarksman",
   "version": "1.0.0",
   "description": "",
-  "main": "index.js",
+  "main": "benchmarksman.js",
   "bin": {
-    "benchmarksman": "main.js"
+    "benchmarksman": "benchmarksman.js"
   },
   "scripts": {
-    "test": "mocha",
-    "benchmarks": "benchmarksman bench/"
+    "test": "mocha test/{,**/}*_test.js",
+    "benchmarks": "./benchmarksman.js example/*.js"
   },
   "author": "",
   "license": "MIT",

+ 0 - 1
test/mocha.opts

@@ -1,4 +1,3 @@
 --reporter spec
 --ui bdd
 --recursive
-**/*_test.js