Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(cli): describe configuration of packages outside node_modules #762

Merged
merged 1 commit into from
Apr 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only difference is that you need te define...

Typo, just change "te" to "to"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Created a PR


<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