Skip to content

Commit fde309c

Browse files
committed
revert use of minified lie by default. add doc to use the minified version
1 parent a8d7b66 commit fde309c

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

Promise.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ define(["require"], function (require) {
3030
// Use absolute path to allow map configuration.
3131
// Also use a variable to avoid RequireJS detection at build time so it is not included in the
3232
// layer.
33-
var lieId = "lie/dist/lie.min";
33+
var lieId = "lie/dist/lie";
3434
require([lieId], function (lie) {
3535
onload(lie);
3636
});

docs/Promise.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,42 @@ title: requirejs-dplugins/Promise
88
`requirejs-dplugins/Promise` provides an ES6 Promise implementation. If the browser does not provide it, the
99
plugin will load the [lie](https://github.com/calvinmetcalf/lie) implementation.
1010

11+
## Configuration
12+
1113
If RequireJS `baseUrl` is not the `bower_components` directory, the path to the `lie` directory should be set
1214
using RequireJS `paths` configuration.
1315

16+
```js
17+
require.config({
18+
paths: {
19+
"lie": "path/to/lie"
20+
}
21+
});
22+
```
23+
24+
If you want to use the minified version of lie, you should use the following configuration:
25+
26+
```js
27+
require.config({
28+
paths: {
29+
"lie/dist/lie": "path/to/lie/dist/lie.min"
30+
}
31+
});
32+
```
33+
34+
35+
## Build
36+
37+
The `lie` module will not be included in a layer depending on the Promise plugin.
38+
It can be included in a layer by including it explicitly.
39+
40+
```js
41+
layers: [{
42+
name: "js/app",
43+
include: ["lie/dist/lie"]
44+
}]
45+
```
46+
1447
## Sample
1548
```
1649
require(["requirejs-dplugins/Promise!"], function(Promise){

0 commit comments

Comments
 (0)