Home Ask Login Register

Developers Planet

Your answer is one click away!

PascalvKooten February 2016

Hide typescript files in ido-find-file when javascript files are present in folder Emacs

Whenever I use ido-find-buffer in Emacs I most of the time get the processed javascript files as first option, while I'd much rather get typescript files first.

Then again, I do not want to always hide javascript files, I guess only when using typescript as well.

Perhaps the best is to have typescript put the javascript files in another folder itself.

Is there a good solution for this?


SnareChops February 2016

You can have Typescript store the compiled files in another folder using the compiler option

"outDir": "dist"

Or whatever folder you want them to output into

PascalvKooten February 2016

I just noticed it is possible to define it in package.json:

  "name": "app",
  "version": "0.1",
  "scripts": {
    "tsc": "tsc",
    "tsc:w": "tsc -w --outDir build",        // <--- here
    "lite": "lite-server",
    "start": "concurrent \"npm run tsc:w\" \"npm run lite\" "

It gets written to a build directory and thus is not causing issues anymore.

Post Status

Asked in February 2016
Viewed 1,282 times
Voted 9
Answered 2 times


Leave an answer

Quote of the day: live life