Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Support all-typescript tooling with ts-node #60

Merged
merged 3 commits into from
Jan 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The full folder structure of this app is explained below:
| **views** | Views define how your app renders on the client. In this case we're using pug |
| .env.example | API keys, tokens, passwords, database URI. Clone this, but don't check it in to public repos. |
| .travis.yml | Used to configure Travis CI build |
| .copyStaticAssets.js | Build script that copies images, fonts, and JS libs to the dist folder |
| .copyStaticAssets.ts | Build script that copies images, fonts, and JS libs to the dist folder |
| jest.config.js | Used to configure Jest |
| package.json | File that contains npm dependencies as well as [build scripts](#what-if-a-library-isnt-on-definitelytyped) |
| tsconfig.json | Config settings for compiling server code written in TypeScript |
Expand Down
5 changes: 0 additions & 5 deletions copyStaticAssets.js

This file was deleted.

5 changes: 5 additions & 0 deletions copyStaticAssets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const shell = require("shelljs");

shell.cp("-R", "src/public/js/lib", "dist/public/js/");
shell.cp("-R", "src/public/fonts", "dist/public/");
shell.cp("-R", "src/public/images", "dist/public/");
177 changes: 177 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
"build-sass": "node-sass src/public/css/main.scss dist/public/css/main.css",
"watch-sass": "node-sass -w src/public/css/main.scss dist/public/css/main.css",
"tslint": "tslint -c tslint.json -p tsconfig.json",
"copy-static-assets": "node copyStaticAssets.js"
"copy-static-assets": "ts-node copyStaticAssets.ts",
"debug": "npm run build && npm run watch-debug",
"serve-debug": "nodemon --inspect dist/server.js",
"watch-debug": "concurrently -k -p \"[{name}]\" -n \"Sass,TypeScript,Node\" -c \"yellow.bold,cyan.bold,green.bold\" \"npm run watch-sass\" \"npm run watch-ts\" \"npm run serve-debug\""
},
"dependencies": {
"async": "^2.5.0",
Expand Down Expand Up @@ -69,6 +72,7 @@
"@types/passport": "^0.3.3",
"@types/passport-facebook": "^2.1.3",
"@types/request": "^2.0.7",
"@types/shelljs": "^0.7.7",
"@types/supertest": "^2.0.0",
"concurrently": "^3.4.0",
"jest": "^21.2.1",
Expand All @@ -77,6 +81,7 @@
"shelljs": "^0.7.7",
"supertest": "^2.0.1",
"ts-jest": "^21.1.4",
"ts-node": "^4.0.2",
"tslint": "^5.8.0",
"typescript": "^2.4.0"
}
Expand Down