Skip to content

Commit ca58445

Browse files
marioaccskipjack
authored andcommitted
CI issues related with markdown fixed.
1 parent a5f17b0 commit ca58445

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/content/guides/author-libraries.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ __project__
2828
```
2929

3030
Initialize npm, install webpack and lodash
31-
``` bash
3231

32+
``` bash
3333
npm init -y
3434
npm install --save-dev webpack lodash
3535
```
3636

3737
__src/ref.json__
38+
3839
```javascript
3940
[{
4041
"num": 1,
@@ -92,9 +93,10 @@ require(['webpackNumbers'], function ( webpackNumbers) {
9293
});
9394

9495
```
96+
9597
The consumer also can use the library loading it with the script tag:
96-
```html
9798

99+
```html
98100
<html>
99101
...
100102
<script src="https://unpkg.com/webpack-numbers"></script>
@@ -109,7 +111,9 @@ The consumer also can use the library loading it with the script tag:
109111
</script>
110112
</html>
111113
```
114+
112115
The configurations also can expose the library in the next ways:
116+
113117
- Property in the global object, for node.
114118
- Property in the this object.
115119

@@ -127,6 +131,7 @@ Now the agenda is to bundle this library achieving the next goals:
127131
- Being able to access the library inside Node.js.s
128132

129133
Also, the consumer will be able to access` the library the `next ways:
134+
130135
- ES2015 module. i.e. `import webpackNumbers from 'webpack-numbers'`.
131136
- CommonJS module. i.e. `require('webpack-numbers')`.
132137
- Global variable when included through `script` tag.
@@ -218,6 +223,7 @@ module.exports = {
218223
```
219224

220225
W>At the moment of webpack 3.5.5, using the next configuration is not working properly as stated in the [issue 4824](https://github.com/webpack/webpack/issues/4824):
226+
221227
```javascript
222228
module.exports = {
223229
...
@@ -232,6 +238,7 @@ module.exports = {
232238
};
233239
```
234240

241+
W> However, you can set libraryTarget.var='_' to expect the library as a global variable
235242

236243
### Add `libraryTarget`
237244

@@ -267,7 +274,9 @@ module.exports = {
267274
...
268275
};
269276
```
277+
270278
You can expose the library in the next ways:
279+
271280
- Variable: as a global variable. Available in the `script` tag. i.e. `libraryTarget:'var'`.
272281
- This: available trough the this object. i.e. `libraryTarget:'this'`.
273282
- Window: available trough the `window` object, in the browser. i.e. `libraryTarget:'window'`.

0 commit comments

Comments
 (0)