Skip to content

Commit 2c6735e

Browse files
docs: improve (#112)
1 parent 367c0e1 commit 2c6735e

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,23 @@ Then you can use the `expose-loader` using two approaches.
3030

3131
## Inline
3232

33-
**src/index.js**
33+
The `|` or `%20` (space) allow to separate the `globalName`, `moduleLocalName` and `override` of expose.
34+
The documentation and syntax examples can be read [here](#syntax).
35+
36+
> `%20` is space in a query string, because you can't use spaces in URLs
3437
3538
```js
3639
import $ from 'expose-loader?exposes[]=$&exposes[]=jQuery!jquery';
3740
//
3841
// Adds the `jquery` to the global object under the names `$` and `jQuery`
3942
```
4043

41-
**src/index.js**
42-
4344
```js
4445
import { concat } from 'expose-loader?exposes=_.concat!lodash/concat';
4546
//
4647
// Adds the `lodash/concat` to the global object under the name `_.concat`
4748
```
4849

49-
**src/index.js**
50-
5150
```js
5251
import {
5352
map,
@@ -57,12 +56,6 @@ import {
5756
// Adds the `map` and `reduce` method from `underscore` to the global object under the name `_.map` and `_.reduce`
5857
```
5958

60-
The `|` or `%20` (space) allow to separate the export name of the module and the name in the global object.
61-
62-
> `%20` is space in a query string, because you can't use spaces in URLs
63-
64-
Description of string values can be found in the documentation below.
65-
6659
## Using Configuration
6760

6861
**src/index.js**
@@ -129,6 +122,10 @@ List of exposes.
129122

130123
Allows to use a string to describe an expose.
131124

125+
##### `Syntax`
126+
127+
The `|` or `%20` (space) allow to separate the `globalName`, `moduleLocalName` and `override` of expose.
128+
132129
String syntax - `[[globalName] [moduleLocalName] [override]]` or `[[globalName]|[moduleLocalName]|[override]]`, where:
133130

134131
- `globalName` - the name in the global object, for example `window.$` for a browser environment (**required**)

0 commit comments

Comments
 (0)