2

May be a noob question about nodejs and typescript, consider i have src folder where all my .ts files are located, and a lib folder for compiled files. When i commit files to ignore lib folder from .gitignore file, my question is simple : - the other developper who is charged to pull my changes and start the production node server should compile first .ts files from source ? and then from package.json he target the compiled lib folder to run the script?

Thanks for your light

1 Answer 1

2

Yeah, in TS it's similiar to compiled languages- you have to compile (transpile) project before using it. The common practice is to use CI/CD to transpile ts files and deploy transpiled ones to production. If you want to simplify the process of running the application in development environment I recommend you taking a look on ts-node npm package

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.