From 9efa4ddd62edd7290fecea0ecd4570f372e33a9f Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Thu, 18 Nov 2021 08:52:51 -0800 Subject: [PATCH] fix: add css exports fixes #912 --- package.json | 38 +++++++++++++++++++------------------- src/lib/package.json | 16 ++++++++++++++++ 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index f19446ce..65153a10 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "ng": "ng", "start": "ng serve", "build": "ng-packagr -p src/lib/package.json", - "postbuild": "cpy README.md LICENSE src/lib/toastr-old.css src/lib/toastr-bs4-alert.scss src/lib/toastr.css dist", + "postbuild": "cpy README.md LICENSE dist", "test": "ng test --watch=false", "test:watch": "ng test", "test:ci": "ng test --watch=false --code-coverage --no-progress", @@ -19,47 +19,47 @@ }, "private": true, "devDependencies": { - "@angular-devkit/build-angular": "13.0.2", + "@angular-devkit/build-angular": "13.0.3", "@angular-eslint/builder": "13.0.0-alpha.0", "@angular-eslint/eslint-plugin": "13.0.0-alpha.0", "@angular-eslint/eslint-plugin-template": "13.0.0-alpha.0", "@angular-eslint/schematics": "13.0.0-alpha.0", "@angular-eslint/template-parser": "13.0.0-alpha.0", - "@angular/animations": "13.0.1", - "@angular/cli": "13.0.2", - "@angular/common": "13.0.1", - "@angular/compiler": "13.0.1", - "@angular/compiler-cli": "13.0.1", - "@angular/core": "13.0.1", - "@angular/forms": "13.0.1", - "@angular/language-service": "13.0.1", - "@angular/platform-browser": "13.0.1", - "@angular/platform-browser-dynamic": "13.0.1", - "@angular/router": "13.0.1", + "@angular/animations": "13.0.2", + "@angular/cli": "13.0.3", + "@angular/common": "13.0.2", + "@angular/compiler": "13.0.2", + "@angular/compiler-cli": "13.0.2", + "@angular/core": "13.0.2", + "@angular/forms": "13.0.2", + "@angular/language-service": "13.0.2", + "@angular/platform-browser": "13.0.2", + "@angular/platform-browser-dynamic": "13.0.2", + "@angular/router": "13.0.2", "@ctrl/ngx-github-buttons": "7.1.0", "@types/jasmine": "3.10.2", "@types/lodash-es": "4.17.5", "@types/node": "16.11.7", - "@typescript-eslint/eslint-plugin": "5.3.1", - "@typescript-eslint/parser": "5.3.1", + "@typescript-eslint/eslint-plugin": "5.4.0", + "@typescript-eslint/parser": "5.4.0", "bootstrap": "5.1.3", "cpy-cli": "3.1.1", "del": "6.0.0", - "eslint": "7.32.0", + "eslint": "8.2.0", "jasmine-core": "3.10.1", "jasmine-spec-reporter": "7.0.0", - "karma": "6.3.8", + "karma": "6.3.9", "karma-chrome-launcher": "3.1.0", "karma-cli": "2.0.0", "karma-coverage-istanbul-reporter": "3.0.3", "karma-jasmine": "4.0.1", "karma-jasmine-html-reporter": "1.7.0", "lodash-es": "4.17.21", - "ng-packagr": "13.0.3", + "ng-packagr": "13.0.5", "rxjs": "7.4.0", "ts-node": "10.4.0", "tslib": "2.3.1", - "typescript": "4.4.4", + "typescript": "4.5.2", "zone.js": "0.11.4" }, "release": { diff --git a/src/lib/package.json b/src/lib/package.json index 4c32e18d..f2a22994 100644 --- a/src/lib/package.json +++ b/src/lib/package.json @@ -7,10 +7,26 @@ "@angular/common": ">=12.0.0-0", "@angular/platform-browser": ">=12.0.0-0" }, + "exports": { + "./toastr": { + "default": "./toastr.css" + }, + "./toastr-old": { + "default": "./toastr-old.css" + }, + "./toastr-bs4-alert": { + "default": "./toastr-bs4-alert.scss" + } + }, "ngPackage": { "lib": { "entryFile": "public_api.ts" }, + "assets": [ + "./toastr.css", + "./toastr-old.css", + "./toastr-bs4-alert.scss" + ], "dest": "../../dist" }, "repository": "scttcper/ngx-toastr",