Skip to content

Instantly share code, notes, and snippets.

@mckernanin mckernanin/
Created Aug 31, 2018

What would you like to do?
Scaffold a typescript project quickly
yarn add dotenv express joi lodash morgan
yarn add -D nodemon ts-node types-installer typescript add-npm-scripts
yarn add-npm-scripts start "nodemon"
yarn add-npm-scripts build "tsc"
yarn types-installer
cat > nodemon.json <<EOL
"watch": ["src"],
"ext": "ts",
"ignore": ["src/**/*.spec.ts"],
"exec": "node --inspect -r ts-node/register ./src/index.ts"
cat > tsconfig.json <<EOL
"compilerOptions": {
"module": "commonjs",
"target": "es2016",
"noImplicitAny": false,
"strictNullChecks": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist",
"baseUrl": ".",
"paths": {
"*": [
"typeRoots": [
"rootDirs": [
"types": [
"include": [
mkdir -p src
cat > src/index.ts <<EOL
console.log('hello world!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.