From ab6147273b0fd1c39e41fcaa23382ff73f07759a Mon Sep 17 00:00:00 2001 From: David Herman Date: Sun, 12 May 2024 11:04:55 -0700 Subject: [PATCH] update README to include the mandatory `--` --- pkgs/create-neon/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/create-neon/README.md b/pkgs/create-neon/README.md index 1630efe7b..04c306a4b 100644 --- a/pkgs/create-neon/README.md +++ b/pkgs/create-neon/README.md @@ -11,9 +11,11 @@ You can conveniently use this tool with the [`npm init`](https://docs.npmjs.com/ To create a simple Neon project that consists purely of Rust code: ```sh -$ npm init neon [ ...] my-project +$ npm init neon -- [ ...] my-project ``` +**Note:** The initial `--` is necessary for `npm init` to pass any command-line options to Neon. + #### Global Options ```sh @@ -27,9 +29,11 @@ Neon also makes it easy to create **portable, cross-platform libraries** by publ To create a portable npm library with pre-built binaries: ```sh -$ npm init neon [ ...] --lib [ ...] my-project +$ npm init neon -- [ ...] --lib [ ...] my-project ``` +**Note:** The initial `--` is necessary for `npm init` to pass any command-line options to Neon. + This will generate a project that can be used by pure JavaScript or TypeScript consumers without them even being aware of the use of Rust under the hood. It achieves this by publishing pre-built binaries for common Node platform architectures that are loaded just-in-time by a JS wrapper module. This command generates the necessary npm and CI/CD configuration boilerplate to require nearly zero manual installation on typical GitHub-hosted repos. The only manual step required is to configure GitHub Actions with the necessary npm access token to enable automated publishing.