From 00ee2d5ba2df5eb1a9cf5227861267d98940fefa Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 10 Oct 2017 15:30:58 +0200 Subject: [PATCH] feat(package): SweetAlert2 is now a peer dependency BREAKING CHANGE: If you haven't specified sweetalert2 in your direct dependencies yet, do it now! --- README.md | 11 +++++------ package.json | 7 +++---- yarn.lock | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9538e05..e2cafeb 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,16 @@ ## :package: Installation & Usage -1) Install via the npm registry: +1) Install NgSweetAlert2 and SweetAlert2 via the npm registry: ```bash -npm install --save @toverux/ngsweetalert2 - -# or, using yarn instead of npm (yarnpkg.com): -yarn add @toverux/ngsweetalert2 +npm install --save sweetalert2 @toverux/ngsweetalert2 ``` -2) Then, import SweetAlert's CSS file, exactly like you're doing usually with vendor styles. Could be a TypeScript `import` with Webpack, a SASS `@import`, or even a `` tag: that depends of you build system. +2) Then, import SweetAlert's CSS (or SCSS) file, exactly like you're doing usually with vendor styles. Could be a TypeScript `import` with Webpack, a SASS `@import`, or even a `` tag: that depends of you build system. + Its path is `node_modules/sweetalert2/dist/sweetalert2.css`. + 3) Finally, import the module: ```typescript diff --git a/package.json b/package.json index 9b063d5..ad73c47 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,9 @@ "webpack-watch": "yarn webpack-build -- --watch", "semantic-release": "semantic-release pre && npm publish --access=public && semantic-release post" }, - "dependencies": { - "sweetalert2": "^6.6.0" - }, "peerDependencies": { - "@angular/core": ">=2.0.0" + "@angular/core": ">=2.0.0", + "sweetalert2": ">=6.0.0" }, "devDependencies": { "@angular/compiler": "^4.0.1", @@ -29,6 +27,7 @@ "codelyzer": "^3.1.2", "rxjs": "^5.0.3", "semantic-release": "^8.0.3", + "sweetalert2": "^6.10.2", "tslint": "^5.6.0", "tslint-loader": "^3.3.0", "typescript": "^2.1.5", diff --git a/yarn.lock b/yarn.lock index 74e6f2c..d0fb904 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3192,7 +3192,7 @@ supports-color@^4.0.0, supports-color@^4.2.1: dependencies: has-flag "^2.0.0" -sweetalert2@^6.6.0: +sweetalert2@^6.10.2: version "6.10.2" resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-6.10.2.tgz#2fdd0d70027d142a08b6b96d4525c71fddfcfe85"