Skip to content

Commit

Permalink
Deprecate support for now.json and package.json (#489)
Browse files Browse the repository at this point in the history
* Removed now.json from readme

* Emit warning message if using now.json or package.json
  • Loading branch information
leo authored Nov 12, 2018
1 parent 96f840c commit 596ae27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Now you understand how the package works! :tada:

## Configuration

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.
To customize `serve`'s behavior, create a `serve.json` file and insert any of [these properties](https://github.com/zeit/serve-handler#options).

## API

Expand Down
4 changes: 4 additions & 0 deletions bin/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ const loadConfig = async (cwd, entry, args) => {
Object.assign(config, content);
console.log(info(`Discovered configuration in \`${file}\``));

if (file === 'now.json' || file === 'package.json') {
console.error(warning('The config files `now.json` and `package.json` are deprecated. Please use `serve.json`.'));
}

break;
}

Expand Down

0 comments on commit 596ae27

Please sign in to comment.