Skip to content

Commit

Permalink
Add info on adding custom lib
Browse files Browse the repository at this point in the history
  • Loading branch information
mgechev committed Dec 28, 2015
1 parent 65371aa commit 6a005d9
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,24 @@ If you want to use your custom libraries:
npm install my-library --save
vim tools/config.js
```
Add reference to the installed library in `PATH.src.jslib` (or whatever you like).
Add reference to the installed library in `NPM_DEPENDENCIES`:

```ts
export const NPM_DEPENDENCIES = [
{ src: 'systemjs/dist/system-polyfills.js', dest: LIB_DEST },


{ src: 'bootstrap/dist/css/bootstrap.min.css', inject: true, dest: CSS_DEST }
// ...
{ src: 'my-library/dist/bundle.js', inject: true, dest: LIB_DEST }
];

```
- `src` - relative to `node_modules`
- `inject` - indicates whether the library should be injected (if not you have to include it manually in `index.html`)
- `dest` - your library will be copied to this location. Used for the production build.

**Do not forget to add a reference to the type definition inside the files where you use your custom library.**

# Running test

Expand Down

0 comments on commit 6a005d9

Please sign in to comment.