Feature request. Could the 'execute' permission be preserved the the generated output?
Current situation:
ls -l src
-rwxr-xr-x 1 user staff 656 Jun 4 19:42 main.ts
ls -l build
-rw-r--r-- 1 user staff 788 Jun 4 19:56 main.js
It would be nice if build/main.js also had the x permissions so it can be executed directly.
Managing permissions for files isn't in the scope of this project. See #14726 for a sort of "dual" request.
As a workaround in my case I added the executable script file to a folder outside the build dir (let's say bin), and keep the contents to just a single require call to the one in the build dir.
./bin/foo.js:
#! /usr/bin/env node
require('../build/foo.js');
This file in bin stays the same, so I added the executable flag there.
The response of "managing permissions" isn't really what this is about. It's more about preserving the runtime characteristics.