Skip to content

Commit 950f571

Browse files
committed
Reimplement build process
This generates slightly different code than we had before, but it should be functionally equivalent.
1 parent df7e67e commit 950f571

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
},
88
"scripts": {
99
"test": "mocha --exit",
10-
"build": "babel src/ --out-dir=dist/ --copy-files",
10+
"build": "tsc && npm run build:assets",
11+
"build:assets": "cp -r {src,dist}/img",
1112
"dev": "concurrently --kill-others --prefix=name --names=server,eslint --prefix-colors=green,magenta \"npm run dev:server\" \"npm run dev:lint\"",
1213
"dev:server": "onchange -i -k 'src/**/*.ts' -- ts-node test/server.ts",
1314
"dev:lint": "onchange -i -k 'src/**/*.ts' -- tslint -t stylish 'src/**/*.ts'",
1415
"prepublishOnly": "npm run build"
1516
},
1617
"author": "",
1718
"license": "MIT",
18-
"main": "dist/routes/avatars.js",
19+
"main": "dist/index.js",
1920
"dependencies": {
2021
"express": "^4.16.4",
2122
"gm": "^1.16.0",
File renamed without changes.

test/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import avatarsRoutes from '../src/routes/avatars';
77
const app = express();
88
const port = Number(process.env.PORT) || 3002;
99

10-
const faviconPath = path.join(__dirname, '..', 'src', 'favicon.ico');
10+
const faviconPath = path.join(__dirname, 'favicon.ico');
1111
app.use(favicon(faviconPath));
1212

1313
app.use('/avatars', avatarsRoutes);

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"target": "es6",
66
"noImplicitAny": false,
77
"moduleResolution": "node",
8-
"sourceMap": true,
98
"outDir": "dist",
109
"baseUrl": ".",
1110
"paths": {

0 commit comments

Comments
 (0)