From 970aff83fa1ef7e9fd92a660fea5d232c45785ae Mon Sep 17 00:00:00 2001 From: David Herman Date: Mon, 15 Apr 2024 13:26:39 -0700 Subject: [PATCH] different hello world for libraries vs simple projects --- pkgs/create-neon/data/templates/README.md.hbs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/create-neon/data/templates/README.md.hbs b/pkgs/create-neon/data/templates/README.md.hbs index f468e4caa..d4b6b739b 100644 --- a/pkgs/create-neon/data/templates/README.md.hbs +++ b/pkgs/create-neon/data/templates/README.md.hbs @@ -22,12 +22,23 @@ This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli) After building {{package.name}}, you can explore its exports at the Node console: +{{#if packageSpec.library}} ```sh +$ npm i +$ npm run build +$ node +> require('.').greeting() +{ message: 'hello node' } +``` +{{else}} +```sh +$ npm i $ npm run build $ node > require('.').hello() -"hello node" +'hello node' ``` +{{/if}} ## Available Scripts