coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.8k stars 356 forks source link

Use script of ts instead of js. #181

Closed sarahshul closed 7 years ago

sarahshul commented 7 years ago

Hi,

Is there a way to use a ts file instead of js file in the script attribute?

For example:

var svc = new Service({ name:'Hello World', description: 'The nodejs.org example web server.', script: 'C:\path\to\helloworld.ts' });

coreybutler commented 7 years ago

You can pass in whatever file extension you want, but you'd have to have a typescript interpretor and I don't think that will work.

houd1ni commented 2 months ago

Useless without typescript. Stuck in previous decades.

rojithaDev commented 1 month ago

Is there no way to use this with a typescript project? If not what would be the most convenient way to do some sort of conversion into js to make it work?

Thanks

coreybutler commented 1 month ago

Folks, please remember Node doesn't support TypeScript. You have to use a build process, just like you would for any other Node project. This project wraps the output of your project/build process. It's not meant to be a TS compiler. Just use tsc like you would any other TS project.