diff --git a/package.json b/package.json index 3a108ba..0229dea 100644 --- a/package.json +++ b/package.json @@ -2,18 +2,20 @@ "name": "x-ng4-http-interceptor-dontuse", "version": "0.0.0-development", "description": "Adds interception capability around angular http api", - "keywords": ["Angular", "Http interceptor", "Interceptor"], + "keywords": [ + "Angular", + "Http interceptor", + "Interceptor" + ], "main": "index.js", "license": "MIT", "scripts": { - "clean": "npm prune && rimraf .tmp && rimraf dist", + "clean": "rimraf .tmp && rimraf dist", "transpile": "ngc", "package": "rollup -c", - "minify": - "./node_modules/uglify-js/bin/uglifyjs dist/bundles/x-ng4-http-interceptor-dontuse.umd.js --screw-ie8 --compress --mangle --comments --output dist/bundles/x-ng4-http-interceptor-dontuse.umd.min.js", + "minify": "uglifyjs dist/bundles/x-ng4-http-interceptor-dontuse.umd.js --screw-ie8 --compress --mangle --comments --output dist/bundles/x-ng4-http-interceptor-dontuse.umd.min.js", "generateDistPackageJson": "node .scripts/generatePackageJson.js", - "build": - "npm run clean && npm run transpile && npm run package && npm run minify && npm run generateDistPackageJson", + "build": "npm run clean && npm run transpile && npm run package && npm run minify && npm run generateDistPackageJson", "commit": "git-cz", "presemantic-release": "npm run build", "semantic-release": "cd dist && semantic-release", @@ -38,7 +40,6 @@ "json-format": "^1.0.0", "rimraf": "^2.5.4", "rollup": "^0.56.0", - "rxjs": "^5.5.6", "semantic-release": "^15.0.0", "tslint": "^5.0.0", "typescript": "~2.5.3", @@ -60,8 +61,7 @@ "name": "1Ton Technologies", "url": "http://1ton.in" }, - "homepage": - "https://github.com/1tontech/x-ng4-http-interceptor-dontuse#readme", + "homepage": "https://github.com/1tontech/x-ng4-http-interceptor-dontuse#readme", "bugs": { "url": "https://github.com/1tontech/x-ng4-http-interceptor-dontuse/issues" }, diff --git a/rollup.config.js b/rollup.config.js index 0fe9cd0..ac1dad5 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,17 +1,19 @@ export default { - entry: 'dist/index.js', - dest: 'dist/bundles/x-ng4-http-interceptor-dontuse.umd.js', - sourceMap: false, - format: 'umd', - moduleName: 'ng.x-ng4-http-interceptor-dontuse', - globals: { - '@angular/core': 'ng.core', - '@angular/http': 'ng.http', - 'rxjs/Observable': 'Rx', - 'rxjs/add/observable/empty': 'Rx.Observable', - 'rxjs/add/observable/of': 'Rx.Observable', - 'rxjs/add/observable/throw': 'Rx.Observable', - 'rxjs/add/operator/catch': 'Rx.Observable.prototype', - 'rxjs/add/operator/mergeMap': 'Rx.Observable.prototype' + input: 'dist/index.js', + sourcemap: false, + output: { + name: 'ng.x-ng4-http-interceptor-dontuse', + globals: { + '@angular/core': 'ng.core', + '@angular/http': 'ng.http', + 'rxjs/Observable': 'Rx', + 'rxjs/add/observable/empty': 'Rx.Observable', + 'rxjs/add/observable/of': 'Rx.Observable', + 'rxjs/add/observable/throw': 'Rx.Observable', + 'rxjs/add/operator/catch': 'Rx.Observable.prototype', + 'rxjs/add/operator/mergeMap': 'Rx.Observable.prototype' + }, + format: 'umd', + file: 'dist/bundles/x-ng4-http-interceptor-dontuse.umd.js' } -} +}; diff --git a/src/interceptor-service.ts b/src/interceptor-service.ts index b9d7bed..c8ce3f7 100644 --- a/src/interceptor-service.ts +++ b/src/interceptor-service.ts @@ -17,6 +17,7 @@ import 'rxjs/add/observable/empty'; import 'rxjs/add/observable/of'; import 'rxjs/add/observable/throw'; import 'rxjs/add/operator/catch'; +import 'rxjs/add/operator/map'; import 'rxjs/add/operator/mergeMap'; import { HttpDirect } from './http-direct';