Skip to content

Commit

Permalink
Support globs in .dojorc bundle config for matching modules (#260)
Browse files Browse the repository at this point in the history
* Support minimatch globs for bundle config

* Add README section

* Add predictable precedence

* Add tests for bundle configuration

* Revert the bundle config until supported by registry transformer

* package-lock.json
  • Loading branch information
agubler authored Mar 22, 2019
1 parent 687a8ed commit 1995cac
Show file tree
Hide file tree
Showing 7 changed files with 1,433 additions and 55 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,25 @@ Widget modules defined used with `w()` will be automatically converted to a lazi
}
```

The bundles configuration supports globs for matching against modules, this can be useful for scenarios such as grouping all nls internationalization modules by locale:

```json
{
"build-app": {
"bundles": {
"fr": [
"src/**/nls/fr/**"
],
"de": [
"src/**/nls/de/**"
]
}
}
}
```

**Note:** The precedence for bundle configuration is 1) An exact match wins against a glob match 2) Order based with the last config winning.

#### `cldrPaths`: string[]

An array of paths to [CLDR JSON](https://github.com/dojo/i18n#loading-cldr-data) files. Used in conjunction with the `locale` and `supportedLocales` options (see below). If a path contains the string `{locale}`, that file will be loaded for each locale listed in the `locale` and `supportedLocales` properties. For example, with the following configuration the `numbers.json` file will be loaded for the "en", "es", and "fr" locales:
Expand Down
Loading

0 comments on commit 1995cac

Please sign in to comment.