Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nissan/80714d0b0d9be81ea92749179d8d6b50 to your computer and use it in GitHub Desktop.
Save nissan/80714d0b0d9be81ea92749179d8d6b50 to your computer and use it in GitHub Desktop.
Setup a new .NET Core 2.1 app for Windows with React, TypeScript, Storybook, Jest
Assumes you have the .NET SDK 2.1 for Windows already installed
#Use Chocolatey to install packages, run this script from Administrator Powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
#Use nvm to manage node versions
choco install -y nvm
nvm use default
#install yarn independent of version of node being used
choco install -y yarn
refreshenv
yarn global add @storybook/cli
mkdir sampleApp
cd sampleApp
dotnet new react
rm -rf ClientApp
create-react-app clientapp --scripts-version=react-scripts-ts
mv clientapp ClientApp
cd ClientApp
yarn add --dev react-test-renderer
getstorybook
#Do `../dotnet run` to run app, `yarn test` to run Jest tests or `yarn start storybook` to view stories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment