Skip to content

Commit

Permalink
Merge pull request #722 from neon-bindings/kv/suggest-napi
Browse files Browse the repository at this point in the history
chore(cli): Suggest using `create-neon` instead
  • Loading branch information
kjvalencik authored May 5, 2021
2 parents 165dffd + 378dcc8 commit 2f2bfca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
5 changes: 5 additions & 0 deletions cli/src/ops/neon_new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || []);
Expand Down

0 comments on commit 2f2bfca

Please sign in to comment.