Skip to content

Commit

Permalink
feat(position): export position service from index of the position fo…
Browse files Browse the repository at this point in the history
…lder

BREAKING CHANGE:
Before:
```
import {Positioning} from 'angular2-bootstrap-confirm/position/position';
```

After:
```
import {Positioning} from 'angular2-bootstrap-confirm/position';
```
  • Loading branch information
Matt Lewis committed Sep 25, 2016
1 parent 76582bb commit 6c48a3e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Then use it in your app on a component:
```typescript
import {Component} from '@angular/core';
import {ConfirmOptions, Position} from 'angular2-bootstrap-confirm';
import {Positioning} from 'angular2-bootstrap-confirm/position/position';
import {Positioning} from 'angular2-bootstrap-confirm/position';
// Or if you're already using the @ng-bootstrap/ng-bootstrap module
// import {Positioning} from '@ng-bootstrap/ng-bootstrap/util/positioning';
// or if you're using the ng2-bootstrap module
Expand Down Expand Up @@ -89,7 +89,7 @@ You may also find it useful to view the [demo source](https://github.com/mattlew

### Usage without a module bundler
```
<script src="node_modules/angular2-bootstrap-confirm/position/position.js"></script>
<script src="node_modules/angular2-bootstrap-confirm/position/index.js"></script>
<script src="node_modules/angular2-bootstrap-confirm/dist/umd/angular2-bootstrap-confirm.js"></script>
<script>
// position service available as ng2BootstrapPosition.Positioning
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:demo": "webpack -p",
"build:umd": "webpack --config webpack.config.umd.js",
"build:dist": "npm run build:umd && npm run ngc",
"build:position": "webpack --config webpack.config.position.js && cp ./node_modules/@ng-bootstrap/ng-bootstrap/util/positioning.d.ts ./position/position.d.ts",
"build:position": "webpack --config webpack.config.position.js && cp ./node_modules/@ng-bootstrap/ng-bootstrap/util/positioning.d.ts ./position/index.d.ts",
"test": "karma start",
"test:watch": "karma start --watch",
"build:clean": "del ./dist ./position",
Expand Down
2 changes: 1 addition & 1 deletion src/position.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Injectable} from '@angular/core';
*
* ```
* // if not also using the @ng-bootstrap/ng-bootstrap module
* import {Positioning} from 'angular2-bootstrap-confirm/position/position';
* import {Positioning} from 'angular2-bootstrap-confirm/position';
* // if already using the @ng-bootstrap/ng-bootstrap module
* import {Positioning} from '@ng-bootstrap/ng-bootstrap/util/positioning';
* import {Position} from 'angular2-bootstrap-confirm';
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.position.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
entry: '@ng-bootstrap/ng-bootstrap/util/positioning',
output: {
filename: 'position/position.js',
filename: 'position/index.js',
libraryTarget: 'umd',
library: 'ng2BootstrapPosition'
},
Expand Down

0 comments on commit 6c48a3e

Please sign in to comment.