Skip to content

Preserve executable file permission when generating from executable .ts file #26060

@sdrsdr

Description

@sdrsdr

As many libraries ship executable files to help with testing or administration it is convenient to be able to keep the executable permission on UNIX like systems while generating .js files from .ts files. The creator of the library can provide a build script or manually keep the proper permissions in distributed generated library but this is sub-optimal

TypeScript Version: 2.9.2
Search Terms: file permissions executable

Expected behavior:

$ ll lib/jem_cli.ts 
-rwxr-xr-x 1 omg omg 5.9K 30 Jul 12,58 lib/jem_cli.ts
$ tsc 
TSFILE: ..../jem_cli.js
$ ll jem_cli.js 
-rwxr-xr-x 1 omg omg 8.2K 30 Jul 13,23 jem_cli.js

Actual behavior:

$ ll lib/jem_cli.ts 
-rwxr-xr-x 1 omg omg 5.9K 30 Jul 12,58 lib/jem_cli.ts
$ tsc 
TSFILE: ..../jem_cli.js
$ ll jem_cli.js 
-rw-r--r-- 1 omg omg 8.2K 30 Jul 13,23 jem_cli.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions