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

Commit 1436c8f

Browse files
author
Bowden Kelly
authored
Merge pull request #60 from peterblazejewicz/feat/ts-node
Support all-typescript tooling with `ts-node`
2 parents 840936a + d56722c commit 1436c8f

File tree

5 files changed

+189
-7
lines changed

5 files changed

+189
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The full folder structure of this app is explained below:
7373
| **views** | Views define how your app renders on the client. In this case we're using pug |
7474
| .env.example | API keys, tokens, passwords, database URI. Clone this, but don't check it in to public repos. |
7575
| .travis.yml | Used to configure Travis CI build |
76-
| .copyStaticAssets.js | Build script that copies images, fonts, and JS libs to the dist folder |
76+
| .copyStaticAssets.ts | Build script that copies images, fonts, and JS libs to the dist folder |
7777
| jest.config.js | Used to configure Jest |
7878
| package.json | File that contains npm dependencies as well as [build scripts](#what-if-a-library-isnt-on-definitelytyped) |
7979
| tsconfig.json | Config settings for compiling server code written in TypeScript |

copyStaticAssets.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

copyStaticAssets.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const shell = require("shelljs");
2+
3+
shell.cp("-R", "src/public/js/lib", "dist/public/js/");
4+
shell.cp("-R", "src/public/fonts", "dist/public/");
5+
shell.cp("-R", "src/public/images", "dist/public/");

package-lock.json

Lines changed: 177 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
"build-sass": "node-sass src/public/css/main.scss dist/public/css/main.css",
2121
"watch-sass": "node-sass -w src/public/css/main.scss dist/public/css/main.css",
2222
"tslint": "tslint -c tslint.json -p tsconfig.json",
23-
"copy-static-assets": "node copyStaticAssets.js"
23+
"copy-static-assets": "ts-node copyStaticAssets.ts",
24+
"debug": "npm run build && npm run watch-debug",
25+
"serve-debug": "nodemon --inspect dist/server.js",
26+
"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\""
2427
},
2528
"dependencies": {
2629
"async": "^2.5.0",
@@ -69,6 +72,7 @@
6972
"@types/passport": "^0.3.3",
7073
"@types/passport-facebook": "^2.1.3",
7174
"@types/request": "^2.0.7",
75+
"@types/shelljs": "^0.7.7",
7276
"@types/supertest": "^2.0.0",
7377
"concurrently": "^3.4.0",
7478
"jest": "^21.2.1",
@@ -77,6 +81,7 @@
7781
"shelljs": "^0.7.7",
7882
"supertest": "^2.0.1",
7983
"ts-jest": "^21.1.4",
84+
"ts-node": "^4.0.2",
8085
"tslint": "^5.8.0",
8186
"typescript": "^2.4.0"
8287
}

0 commit comments

Comments
 (0)