Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 8730342

Browse files
authored
Merge pull request #25 from FidelLimited/refactor-readme
refactor(readme): Make things simple
2 parents b1bb4d2 + e4c3d89 commit 8730342

File tree

2 files changed

+14
-91
lines changed

2 files changed

+14
-91
lines changed

README.md

Lines changed: 13 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -41,66 +41,24 @@ Configuration options can be set globally in `custom` property and inside each f
4141
#### Global
4242

4343
* **debug** (default `false`) - When debug is set to `true` it won't remove `prefix` folder and will generate debug output at the end of package creation.
44-
45-
```yml
46-
custom:
47-
optimize:
48-
debug: true
49-
```
50-
5144
* **exclude** (default `['aws-sdk']`) - Array of modules or paths that will be excluded.
52-
53-
```yml
54-
custom:
55-
optimize:
56-
exclude: ['ajv']
57-
```
58-
5945
* **extensions** (default `['.js', '.json']`) - Array of optional extra extensions modules that will be included.
60-
61-
```yml
62-
custom:
63-
optimize:
64-
extensions: ['.extension']
65-
```
66-
67-
* **global** (default `true`) - When global is set to `false` transforms won't be run inside `node_modules`.
68-
69-
```yml
70-
custom:
71-
optimize:
72-
global: false`
73-
```
74-
46+
* **global** (default `false`) - When global is set to `true` transforms will run inside `node_modules`.
7547
* **ignore** - Array of modules or paths that won't be transformed with Babelify and Uglify.
76-
77-
```yml
78-
custom:
79-
optimize:
80-
ignore: ['ajv']
81-
```
82-
8348
* **minify** (default `true`) - When minify is set to `false` Uglify transform won't run.
84-
85-
```yml
86-
custom:
87-
optimize:
88-
minify: false
89-
```
90-
9149
* **prefix** (default `_optimize`) - Folder to output bundle.
92-
93-
```yml
94-
custom:
95-
optimize:
96-
prefix: 'dist'
97-
```
98-
9950
* **presets** (default `['es2015']`) - Array of Babel presets.
10051

10152
```yml
10253
custom:
10354
optimize:
55+
debug: true
56+
exclude: ['ajv']
57+
extensions: ['.extension']
58+
global: true
59+
ignore: ['ajv']
60+
minify: false
61+
prefix: 'dist'
10462
presets: ['es2016']
10563
```
10664

@@ -115,56 +73,21 @@ functions:
11573
```
11674

11775
* **exclude** - Array of modules or paths that will be excluded.
118-
119-
```yml
120-
functions:
121-
hello:
122-
optimize:
123-
exclude: ['ajv']
124-
```
125-
12676
* **extensions** - Array of optional extra extensions modules that will be included.
77+
* **global** - When global is set to `true` transforms will run inside `node_modules`.
78+
* **ignore** - Array of modules or paths that won't be transformed with Babelify and Uglify.
79+
* **minify** - When minify is set to `false` Uglify transform won't run.
80+
* **presets** - Array of Babel presets.
12781

12882
```yml
12983
functions:
13084
hello:
13185
optimize:
86+
exclude: ['ajv']
13287
extensions: ['.extension']
133-
```
134-
135-
* **global** - When global is set to `false` transforms won't be run inside `node_modules`.
136-
137-
```yml
138-
functions:
139-
hello:
140-
optimize:
14188
global: false
142-
```
143-
144-
* **ignore** - Array of modules or paths that won't be transformed with Babelify and Uglify.
145-
146-
```yml
147-
functions:
148-
hello:
149-
optimize:
15089
ignore: ['ajv']
151-
```
152-
153-
* **minify** - When minify is set to `false` Uglify transform won't run.
154-
155-
```yml
156-
functions:
157-
hello:
158-
optimize:
15990
minify: false
160-
```
161-
162-
* **presets** - Array of Babel presets.
163-
164-
```yml
165-
functions:
166-
hello:
167-
optimize:
16891
presets: ['es2016']
16992
```
17093

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Optimize {
4444
debug: false,
4545
exclude: ['aws-sdk'],
4646
extensions: [],
47-
global: true,
47+
global: false,
4848
ignore: [],
4949
minify: true,
5050
prefix: '_optimize',

0 commit comments

Comments
 (0)