Skip to content

Instantly share code, notes, and snippets.

@nissan
Last active June 2, 2018 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nissan/a63663e17e9327ad84cd5aab68cd1506 to your computer and use it in GitHub Desktop.
Save nissan/a63663e17e9327ad84cd5aab68cd1506 to your computer and use it in GitHub Desktop.
Setup a new .NET Core 2.1 app for Mac OSX with React, TypeScript, Storybook, Jest
#Assumes you have the .NET SDK 2.1 for Mac already installed
#Use Homebrew to install packages
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#Use nvm to manage node versions
brew install nvm
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile
echo '. "/usr/local/opt/nvm/nvm.sh"' >>~/.bash_profile
nvm install v10.3.0
nvm use default
#install yarn independent of version of node being used
brew install yarn --without-node
yarn global add create-react-app
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