File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ define(["require"], function (require) {
30
30
// Use absolute path to allow map configuration.
31
31
// Also use a variable to avoid RequireJS detection at build time so it is not included in the
32
32
// layer.
33
- var lieId = "lie/dist/lie.min " ;
33
+ var lieId = "lie/dist/lie" ;
34
34
require ( [ lieId ] , function ( lie ) {
35
35
onload ( lie ) ;
36
36
} ) ;
Original file line number Diff line number Diff line change @@ -8,9 +8,42 @@ title: requirejs-dplugins/Promise
8
8
` requirejs-dplugins/Promise ` provides an ES6 Promise implementation. If the browser does not provide it, the
9
9
plugin will load the [ lie] ( https://github.com/calvinmetcalf/lie ) implementation.
10
10
11
+ ## Configuration
12
+
11
13
If RequireJS ` baseUrl ` is not the ` bower_components ` directory, the path to the ` lie ` directory should be set
12
14
using RequireJS ` paths ` configuration.
13
15
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
+
14
47
## Sample
15
48
```
16
49
require(["requirejs-dplugins/Promise!"], function(Promise){
You can’t perform that action at this time.
0 commit comments