From 442016de1b7cf85a65c5fbd61d2c8274688078a6 Mon Sep 17 00:00:00 2001 From: houmark Date: Thu, 11 Aug 2016 05:03:40 -0500 Subject: [PATCH 1/2] npm cannot handle "main" as an array - must be a string There's currently no way to include CSS in the package.json file, so it will need to be included manually by the developer. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a90936..aa73ce8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nz-toggle", "version": "2.2.1", "description": "__Double and Triple-State Toggle for AngularJS__", - "main": ["dist/nz-toggle.js", "dist/nz-toggle.css"], + "main": "dist/nz-toggle.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, From 388705422e803334f4020b7c827b034d1b05f930 Mon Sep 17 00:00:00 2001 From: Lars Houmark Date: Thu, 11 Aug 2016 07:03:03 -0500 Subject: [PATCH 2/2] Update package.json for npm install Make it possible to `require('nz-toggle');` This makes it a one line require in AngularJS after installing using nam (not considering CSS). --- index.js | 2 ++ package.json | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..0356923 --- /dev/null +++ b/index.js @@ -0,0 +1,2 @@ +require('./dist/nz-toggle.js'); +module.exports = 'nzToggle'; diff --git a/package.json b/package.json index aa73ce8..922864e 100644 --- a/package.json +++ b/package.json @@ -2,20 +2,20 @@ "name": "nz-toggle", "version": "2.2.1", "description": "__Double and Triple-State Toggle for AngularJS__", - "main": "dist/nz-toggle.js", + "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", - "url": "git+https://github.com/nozzle/nz-toggle.git" + "url": "git+https://github.com/tannerlinsley/nz-toggle.git" }, "author": "Tanner Linsley ", "license": "ISC", "bugs": { - "url": "https://github.com/nozzle/nz-toggle/issues" + "url": "https://github.com/tannerlinsley/nz-toggle/issues" }, - "homepage": "https://github.com/nozzle/nz-toggle", + "homepage": "https://github.com/tannerlinsley/nz-toggle", "dependencies": { "gulp": "^3.9.0", "gulp-ng-annotate": "^1.0.0",