Skip to content

Commit

Permalink
fix(build): build to root instead of dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBGod committed May 21, 2016
1 parent 1ec92ba commit fefafb8
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 40 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If you use SystemJS to load your files, you might have to update your config wit
```js
System.config({
packages: {
"/ng2-scrollspy": {"defaultExtension": "js"}
"ng2-scrollspy": {"defaultExtension": "js"}
}
});
```
Expand All @@ -35,6 +35,7 @@ It is recommended to instantiate `ScrollSpyService` in the bootstrap of your app
If you add it to the "providers" property of a component it will instantiate a new instance of the service that won't be initialized.

```js
import {bootstrap} from '@angular/platform-browser-dynamic';
import {ScrollSpyService} from 'ng2-scrollspy';

bootstrap(AppComponent, [
Expand Down
12 changes: 12 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {ScrollSpyService} from './src/core/service';
import {ScrollSpyDirective} from './src/core/window.directive';
import {ScrollSpyElementDirective} from './src/core/element.directive';

export * from './src/core/service';
export * from './src/core/window.directive';
export * from './src/core/element.directive';

export default {
directives: [ScrollSpyDirective, ScrollSpyElementDirective],
providers: [ScrollSpyService]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"build": "rm -rf ./dist/ && rm -rf ./typings/ && ./node_modules/.bin/typings install && tsc -d",
"semantic-release": "semantic-release pre && npm run build && npm publish && semantic-release post"
},
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"main": "./index.js",
"typings": "./index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/jonnybgod/ng2-scrollspy.git"
Expand Down
74 changes: 37 additions & 37 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": false,
"pretty": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": true,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"outDir": "./dist"
},
"files": [
"typings/browser.d.ts",
"src/index.ts",
"src/core/element.directive.ts",
"src/core/service.spec.ts",
"src/core/service.ts",
"src/core/window.directive.ts",
"src/plugin/affix.directive.ts",
"src/plugin/affix.ts",
"src/plugin/index.directive.ts",
"src/plugin/index.render.directive.ts",
"src/plugin/index.service.spec.ts",
"src/plugin/index.service.ts",
"src/plugin/index.ts",
"src/plugin/infinite.directive.ts",
"src/plugin/infinite.ts",
"src/plugin/parallax.directive.ts",
"src/plugin/parallax.ts"
]
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": false,
"pretty": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": true,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true
},
"files": [
"typings/browser.d.ts",
"index.ts",
"src/core/element.directive.ts",
"src/core/service.spec.ts",
"src/core/service.ts",
"src/core/window.directive.ts",
"src/plugin/affix.directive.ts",
"src/plugin/affix.ts",
"src/plugin/index.directive.ts",
"src/plugin/index.render.directive.ts",
"src/plugin/index.service.spec.ts",
"src/plugin/index.service.ts",
"src/plugin/index.ts",
"src/plugin/infinite.directive.ts",
"src/plugin/infinite.ts",
"src/plugin/parallax.directive.ts",
"src/plugin/parallax.ts"
],
"compileOnSave": false
}

0 comments on commit fefafb8

Please sign in to comment.