Merge pull request #722 from neon-bindings/kv/suggest-napi

chore(cli): Suggest using `create-neon` instead
This commit is contained in:
K.J. Valencik 2021-05-05 12:04:42 -04:00 committed by GitHub
commit 2f2bfca92a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -13,12 +13,13 @@ Rust bindings for writing safe and fast native Node.js modules.
Once you have the [platform dependencies](https://neon-bindings.com/docs/getting-started#install-node-build-tools/) installed, getting started is as simple as:
```
$ npm install -g neon-cli
$ neon new my-project
$ npm init neon my-project
```
Then see the [Hello World guide](https://neon-bindings.com/docs/hello-world/) for writing your first Hello World in Neon!
_**Note:** This will create a new project with the `napi-backend` and some documentation may not be up to date._
# Docs
See our [Neon fundamentals docs](https://neon-bindings.com/docs/intro) and our [API docs](https://docs.rs/neon/latest/neon).

View File

@ -99,6 +99,11 @@ interface Answers {
}
export default async function wizard(pwd: string, name: string, neon: string | null, features: string | null, noDefaultFeatures: boolean) {
let warning = "WARN: `neon new` is deprecated. To create a new project use `npm init neon my-project`.";
let banner = "".padStart(warning.length + 4, "#");
console.warn(`${banner}\n# ${warning} #\n${banner}\n`);
let its = validateName(name);
if (!its.validForNewPackages) {
let errors = (its.errors || []).concat(its.warnings || []);