Reputation: 126
Is it possible to setup absolute path to a different disk drive, like i have my work on D:\work\project\tsconfig.json, and i want it to compile in c:\work\release.js If i write "outDir": "C:/work/release/" compile doesn't create .js files !
Is it possible or not ?
Upvotes: 2
Views: 490
Reputation: 141662
Yes. It is possible to setup an absolute path to a different disk drive.
Use either outFile or outDir.
outFile works only with AMD and System as the module
setting. See the details in the --module setting description.
{
"compilerOptions": {
"target": "es5",
"module": "amd",
"outFile": "C://work/release.js"
}
}
ourDir works with any valid module
setting.
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"outDir": "C://work/release/"
}
}
Consider the following source file directory:
D:\work\project\
tsconfig.json
index.ts
addProduct.ts
sellProduct.ts
outFile builds the source files into a single output file:
C:\work\
release.js
outDir builds the source files and maintains the original file names:
C:\work\release\
index.js
addProduct.js
sellProduct.js
Upvotes: 1