Skip to content

Commit 596ae27

Browse files
authored
Deprecate support for now.json and package.json (#489)
* Removed now.json from readme * Emit warning message if using now.json or package.json
1 parent 96f840c commit 596ae27

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Now you understand how the package works! :tada:
3636

3737
## Configuration
3838

39-
To customize `serve`'s behavior, create a `serve.json` file and insert any of [these properties](https://github.com/zeit/serve-handler#options). In addition, `serve` will also detect `now.json` files if they contain the `static` property.
39+
To customize `serve`'s behavior, create a `serve.json` file and insert any of [these properties](https://github.com/zeit/serve-handler#options).
4040

4141
## API
4242

bin/serve.js

+4
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ const loadConfig = async (cwd, entry, args) => {
284284
Object.assign(config, content);
285285
console.log(info(`Discovered configuration in \`${file}\``));
286286

287+
if (file === 'now.json' || file === 'package.json') {
288+
console.error(warning('The config files `now.json` and `package.json` are deprecated. Please use `serve.json`.'));
289+
}
290+
287291
break;
288292
}
289293

0 commit comments

Comments
 (0)