Skip to content

Commit bb610e7

Browse files
committed
add “Custom Config” docs (WIP)
1 parent 834f804 commit bb610e7

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ charset = utf-8
77
trim_trailing_whitespace = true
88
insert_final_newline = true
99

10-
[{*.json,.*rc,*.yml}]
10+
[{*.json,.*rc,*.yml,*.md}]
1111
indent_style = space
1212
indent_size = 2
1313

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
- Monitor your bundle/chunk sizes with built-in tracking
1515
- Automatic app mounting, debug helpers & Hot Module Replacement
1616
- In just **4.5kb** you get a productive environment:
17-
- [preact]
18-
- [preact-router]
19-
- 1.5kb of conditionally-loaded polyfills for [fetch](https://github.com/developit/unfetch) & [Promise](https://npm.im/promise-polyfill)
17+
- [preact]
18+
- [preact-router]
19+
- 1.5kb of conditionally-loaded polyfills for [fetch](https://github.com/developit/unfetch) & [Promise](https://npm.im/promise-polyfill)
2020

2121

2222
### Commands
@@ -79,8 +79,8 @@ $ preact serve
7979

8080
--dir Directory root to serve static files from. [default: "build"]
8181
--cwd The working directory in which to spawn a server. [default: .]
82-
--server Which server to run, or "config" to produce a firebase config.
83-
[options: "simplehttp2server", "superstatic", "config"] [default:"simplehttp2server"]
82+
--server Which server to run, or "config" to produce a firebase config.
83+
[options: "simplehttp2server", "superstatic", "config"] [default:"simplehttp2server"]
8484
--dest Directory or filename where firebase.json should be written
8585
(used for --server config) [default: -]
8686
--port, -p Port to start a server on [default: "8080"]
@@ -99,6 +99,27 @@ npm run serve -- --server config
9999
# Copy your static files to a server!
100100
```
101101

102+
### Custom Configuration
103+
104+
> **TL;DR** Currently in progress. See [#56](https://github.com/developit/preact-cli/pull/56)
105+
106+
#### Browserlist
107+
108+
You may customize your list of supported browser versions by declaring a [`"browerslist"`](https://github.com/ai/browserslist) key within your `package.json`. Changing these values will modify your JavaScript (via [`babel-preset-env`](https://github.com/babel/babel-preset-env#targetsbrowsers)) and your CSS (via [`autoprefixer`]()) output.
109+
110+
By default, `preact-cli` emulates the following config:
111+
112+
```js
113+
// package.json
114+
{
115+
"browserslist": [
116+
"> 1%",
117+
"IE >= 9",
118+
"last 2 versions"
119+
]
120+
}
121+
```
122+
102123

103124
[preact]: https://github.com/developit/preact
104125
[preact-router]: https://github.com/developit/preact-router

0 commit comments

Comments
 (0)