From fd8d46560f0695bb39d3817c37fca8f28822f2ca Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Thu, 30 Oct 2014 10:50:00 +0100 Subject: [PATCH] Add an entry point to ease ES6 imports --- index.js | 6 ++++++ package.json | 2 ++ test/MainSpec.js | 10 ++++++++++ 3 files changed, 18 insertions(+) create mode 100644 index.js create mode 100644 test/MainSpec.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..bf563b7 --- /dev/null +++ b/index.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + compile: require("./compile"), + mixin: require("./mixin"), +}; diff --git a/package.json b/package.json index 0500c0e..1e16bd5 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,10 @@ "bugs": { "url": "https://github.com/jussi-kalliokoski/react-no-jsx/issues" }, + "main": "index.js", "files": [ "compile.js", + "index.js", "mixin.js" ], "scripts": { diff --git a/test/MainSpec.js b/test/MainSpec.js new file mode 100644 index 0000000..46f2b83 --- /dev/null +++ b/test/MainSpec.js @@ -0,0 +1,10 @@ +"use strict"; + +describe("no-jsx", function () { + var noJsx = require("../index"); + + it("should export library functions", function () { + noJsx.should.have.property('compile'); + noJsx.should.have.property('mixin'); + }); +});