Skip to content

Commit

Permalink
doc(cli): describe configuration of packages outside node_modules
Browse files Browse the repository at this point in the history
documentation of aurelia/cli#576
  • Loading branch information
JeroenVinke authored Apr 8, 2017
1 parent f2f1f88 commit 09061c7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/article/en-US/the-aurelia-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,23 @@ And this is an example of loading a `@scope/packagename` plugin during app start
aurelia.use.standardConfiguration().plugin('@scope/packagename');
```

### Reference packages outside of the node_modules folder

It is possible to use packages outside of the node_modules folder. The only difference is that you need te define what the `packageRoot` is. In `aurelia.json`, you can define a package that lives outside of the node_modules folder as follows:

<code-listing heading="Package outside of node_modules">
<source-code lang="JavaScript">
dependencies: [{
"name": "my-standalone-folder",
"path": "../my-standalone-folder/dist/amd",
"main": "index",
"packageRoot": "../my-standalone-folder"
}]
</source-code>
</code-listing>

The `packageRoot` is the root folder of the package. This is often the folder which contains the `package.json` file of the package.

## [Configuring the Loader](aurelia-doc://section/11/version/1.0.0)

You can configure the loader by adding a `config` key to `build.loader` with the options you want to add. For instance, if you want to increase the timeout for requirejs, you would do this:
Expand Down

0 comments on commit 09061c7

Please sign in to comment.