From 49d0cc0662c1fc6daa8ec86d2d4c643c483fd46e Mon Sep 17 00:00:00 2001 From: Kevin Boosten Date: Mon, 29 May 2017 10:37:28 +0200 Subject: [PATCH] chore(commonjs): Add support for commonjs and npm Added angularjs-dropdown-multiselect to module exports so that after installing via npm, the package can be required in the angular module dependency list such as: angular.module('myApp', [require('angularjs-dropdown-multiselect')]); This is helpful for Browserify and Webpack. --- index.js | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 00000000..529c3b4b --- /dev/null +++ b/index.js @@ -0,0 +1,2 @@ +require('./dist/angularjs-dropdown-multiselect.min.js'); +module.exports = 'angularjs-dropdown-multiselect'; diff --git a/package.json b/package.json index 7df0f642..645fa3fc 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "engines": { "node": ">=0.10.10" }, - "main": "dist/angularjs-dropdown-multiselect.min.js", + "main": "index.js", "keywords": [ "angular", "multiselect"