From 73482c1ddd17accf1a48610ef04eac6f2c79ad22 Mon Sep 17 00:00:00 2001 From: Jonathan Wilsson Date: Tue, 24 Jan 2017 15:36:12 +0100 Subject: [PATCH] Expose Lesshint and Runner classes in the public API --- lib/index.js | 6 ++++++ package.json | 2 +- test/specs/index.js | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 lib/index.js create mode 100644 test/specs/index.js diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 00000000..ead25f63 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = { + Lesshint: require('./lesshint'), + Runner: require('./runner') +}; diff --git a/package.json b/package.json index a3d0eecc..dc527b20 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "lesshint", "description": "A tool to aid you in writing clean and consistent Less.", "version": "2.4.0", - "main": "./lib/lesshint.js", + "main": "./lib/index.js", "author": { "name": "Jonathan Wilsson", "email": "jonathan.wilsson@gmail.com" diff --git a/test/specs/index.js b/test/specs/index.js new file mode 100644 index 00000000..0b668112 --- /dev/null +++ b/test/specs/index.js @@ -0,0 +1,15 @@ +'use strict'; + +const expect = require('chai').expect; + +describe('lesshint', function () { + const api = require('../../lib/index'); + + it('should expose Lesshint class in public API', function () { + expect(api.Lesshint).to.be.a('function'); + }); + + it('should expose Runner class in public API', function () { + expect(api.Runner).to.be.a('function'); + }); +});