Skip to content

Instantly share code, notes, and snippets.

@nissan
Last active June 1, 2018 23:31
Show Gist options
  • Save nissan/3eca56d4ac4b13285f30f8a943d38795 to your computer and use it in GitHub Desktop.
Save nissan/3eca56d4ac4b13285f30f8a943d38795 to your computer and use it in GitHub Desktop.
Setup a new .NET Core 2.1 app for Mac OSX with React, 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 @storybook/cli
mkdir sampleApp
cd sampleApp
dotnet new react
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