Skip to content

Instantly share code, notes, and snippets.

@cumet04
Created February 3, 2019 03:56
Show Gist options
  • Save cumet04/e277b0bf83804570afb0672f636fc13e to your computer and use it in GitHub Desktop.
Save cumet04/e277b0bf83804570afb0672f636fc13e to your computer and use it in GitHub Desktop.
init simple typescript project
#!/bin/bash
anyenv update
LATEST_NODE=$(nodenv install -l | grep '\ 10' | tail -n 1)
nodenv install $LATEST_NODE
nodenv local $LATEST_NODE
npm install -g yarn
yarn init
yarn add -D typescript prettier
cat > tsconfig.json << EOF
{
"compilerOptions": {
"target": "es2017",
"outDir": "dest",
"module": "commonjs"
},
"include": ["src"]
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment