Compile typescript with the visual studio code task by specifying the output directory

I have this task in Visual Studio code that compiles my typescript files. I would like to create a cleaner file structure by adding all typescript to one folder and all javascript to another folder. How do I change the arguments of my task? My current code forces it to compile the output in the same folder as typescript. Here is the current code:

{
    "version": "0.1.0",

    // The command is tsc. Assumes that tsc has been installed using npm install -g typescript
    "command": "tsc",

    // The command is a shell script
    "isShellCommand": true,

    // Show the output window only if unrecognized errors occur.
    "showOutput": "silent",

    // args is the HelloWorld program to compile.
    "args": [
        "scripts/front_end/view_models/search_filter_view_model.ts",
        "scripts/front_end/models/area_getter.ts",
         "scripts/front_end/bootstrap_app.ts",
         "scripts/front_end/models/category.ts",
         "scripts/front_end/plugins/slideshow.ts"
    ],

    // use the standard tsc problem matcher to find compile problems
    // in the output.
    "problemMatcher": "$tsc"
}
+4
source share
1 answer

, . tsconfig.json, angular. , . outDir outFile , , .

{
  "compilerOptions": {
    "target": "es5",
    "module": "system",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": true,
    "noImplicitAny": false,
    "outDir":"client/build/",
    "outFile": "client/build/all.js",
    "declaration": true
  },
  "exclude": [
    "node_modules",
    "server"
  ],
  "include": [
        "client/*.ts",
        "client/**/*.ts",
        "client/**/**/*.ts"
  ]   
}

// Include all folders to put to a file.
/*    "outDir":"client/build/",
    "outFile": "client/build/all.js" */
+4

All Articles