Answer the question
In order to leave comments, you need to log in
How to create two commands to compile ts?
Good afternoon, tell me please.
How to create two teams in one?
As I understand it, the line "build": "tsc"
says that you need to run a file in the same folder tsconfig.json
, but how to write two commands in it?
I need to compile the other two folders into separate ones as well, how can I write more than one command for "build": "tsc"
?
And tell me about tsconfig, maybe something else is usually added, otherwise I just started to study it.
package.json
{
"name": "project",
"version": "1.0.0",
"description": "modules",
"main": "dist/server.js",
"scripts": {
"build": "tsc",
"start": "node dist/server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
{
"compilerOptions": {
"esModuleInterop": true,
"outDir": "dist",
"baseUrl": "."
}
}
Answer the question
In order to leave comments, you need to log in
Greetings!
To learn more about tsconfig, nothing can help better than the official documentation - https://www.typescriptlang.org/docs/handbook/tscon...
Regarding running multiple commands, you can either do this:
"start": "tsc && node dist/server.js"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question