Skip to content

Commit

Permalink
change exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Secbone committed Jul 20, 2016
1 parent 2388b46 commit 3ac17f8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
6 changes: 1 addition & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});

var _regenerator = require("babel-runtime/regenerator");

var _regenerator2 = _interopRequireDefault(_regenerator);
Expand Down Expand Up @@ -67,4 +63,4 @@ function serve(path, root) {
}();
}

exports.default = serve;
module.exports = serve;
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ function serve(path, root) {
}
}

export default serve;
module.exports = serve;
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Middleware for Koa2 to serve a folder under a name declared by user with Babel",
"main": "dist/index.js",
"scripts": {
"test": "mocha"
"test": "mocha --compilers js:babel-register --require babel-polyfill"
},
"repository": {
"type": "git",
Expand All @@ -29,8 +29,10 @@
},
"devDependencies": {
"babel-plugin-transform-runtime": "^6.9.0",
"babel-preset-es2015": "^6.3.13",
"babel-polyfill": "^6.9.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-stage-3": "^6.3.13",
"babel-register": "^6.9.0",
"gulp": "^3.9.0",
"gulp-babel": "^6.1.1",
"koa": "^2.0.0",
Expand Down
8 changes: 4 additions & 4 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use strict"

const assert = require("assert");
const serve = require("../dist/index.js").default;
const Koa = require("koa");
const request = require("supertest");
import assert from "assert";
import serve from "../dist/index.js";
import Koa from "koa";
import request from "supertest";

describe("Koa-static2", () => {
const app = new Koa();
Expand Down

0 comments on commit 3ac17f8

Please sign in to comment.