From 09061c7468f544599e9403389851d63518882261 Mon Sep 17 00:00:00 2001 From: Jeroen Vinke Date: Sat, 8 Apr 2017 21:22:17 +0200 Subject: [PATCH] doc(cli): describe configuration of packages outside node_modules documentation of https://github.com/aurelia/cli/pull/576 --- doc/article/en-US/the-aurelia-cli.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/article/en-US/the-aurelia-cli.md b/doc/article/en-US/the-aurelia-cli.md index 5f4ed52d..53ddd878 100644 --- a/doc/article/en-US/the-aurelia-cli.md +++ b/doc/article/en-US/the-aurelia-cli.md @@ -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: + + + + dependencies: [{ + "name": "my-standalone-folder", + "path": "../my-standalone-folder/dist/amd", + "main": "index", + "packageRoot": "../my-standalone-folder" + }] + + + +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: