1.0.0 • Published 17 days ago

dotnet-react-generator v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
17 days ago

dotnet-react-generator

This is a node script that can generate a new project based on the repo dotnet-react-sandbox.

The generated project works on Windows, Linux and Mac, but note that certificate setup has to be done manually on Linux and Mac (see docs for the dotnet-react-sandbox project for more info).

Running this script requires NodeJS >= 20 and git.

If you want to finish the setup of the new project, you'll also need:

  • Dotnet SDK 8
  • Docker
  • OpenSSL

Example Usage

cd ~/src
npx -y dotnet-react-generator@latest -o acme -u acme.com -d acme
cd acme
npm run npmInstall

# In shell with elevated permissions
npx swig setup

# In 2 separate shells (elevated permissions not required):
npx swig server
npx swig client

Then navigate to https://local.acme.com.

Full setup instructions: Dotnet React Sandbox

What It Does

  • Clones dotnet-react-sandbox into directory specified with -o option
  • Updates placeholders within files based on options passed
  • Sets up a docker-compose for a postgres database named from your -d option

For more info see dotnet-react-sandbox.

Remove Generated Project

If you didn't run additional setup commands after generating the project:

  • Delete the project directory

If you ran additional setup commands like npx swig setup, you can run this command in an elevated shell (see below for manual steps):

  • Run in an elevated shell within the project: npx swig teardown
  • Delete the project directory

Or manually:

  • Delete hosts entry
  • Uninstall cert (for details, see Dotnet React Sandbox)
  • Delete the project directory

NPX Gotchas

  • Depending on what version of npm you have installed, if you have run the npx command before and there's a new version available, npx won't get the new version unless you explicitly add @latest (or specific version) to the command, or explicitly clear your npx cache.
  • Sometimes even when using @latest npx still won't pull down a new version unless you also pass the --ignore-existing option.
  • If you run npx within an existing node project it may look in the project-local node_modules bin and won't find dotnet-react-generator. If this happens, just run it from a non-node project directory or install it globally by running: npm i -g dotnet-react-generator.

Development

See DevNotes.md

1.0.0

17 days ago

0.1.4

3 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.0.24

7 months ago

0.0.25

7 months ago

0.1.0

5 months ago

0.1.1

5 months ago

0.0.20

7 months ago

0.0.21

7 months ago

0.0.22

7 months ago

0.0.23

7 months ago

0.0.16

9 months ago

0.0.17

9 months ago

0.0.18

7 months ago

0.0.19

7 months ago

0.0.10

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago