Comments (9)
Not sure if I follow what you're suggesting.
What's your use-case?
from tsx.
I am creating a framework and it needs a command to run typescript in development mode. I am intending to use tsx
to run the compiled typescript script
from tsx.
You mean the uncompiled TypeScript code.
In your code, you can currently:
- spawn a tsx process
- use the new loader we just deployed: #9
I'll considering exporting a method that spawns tsx given a file path. But the JS API will be limited to a spawn because it needs to be read by the Loader API.
Would love to hear more about your use-case when you have more details.
from tsx.
I tried spawn
but when something goes wrong the error message is all white text. I don't think I can debug if the error message is not so prominent
from tsx.
I believe the output stream needs to be TTY for colors to be outputted.
You can inherit the stdout to display colors: https://github.com/esbuild-kit/tsx/blob/a271f4d1773bfb0ffdd072aa36e996c6e8602b32/src/run.ts#L21-L25
from tsx.
I found out when there is a syntax error on the files it seems that tsx
itself doesn't have the error color
from tsx.
by the way can you review this pull request esbuild-kit/esm-loader#11
from tsx.
Back to the original request.
You can now spawn a tsx process without losing color in stderr.
Is this request closable?
from tsx.
Closed
from tsx.
Related Issues (20)
- is there an option to watch html and css files?
- Property not assigned to child class when set by parent HOT 3
- VS Code breakpoint with tsx and Nodejs 20.12.0 does not work HOT 20
- The argument 'methodName' must be a method. Received undefined HOT 7
- Tsx ignores type commonjs in package.json HOT 1
- Add extra files to watch HOT 1
- Environment variables support HOT 5
- Typescript REPL HOT 1
- Multiline input in Typescript REPL
- Feature request: Extend 'tsx watch' for run command on detects file changes HOT 2
- Parse error when using classes and complicated hashbangs
- Script not running when node=21, type="module", watchmode is enabled, is importing from "node:process" and using turborepo HOT 1
- Support `--input-type=ts` HOT 2
- tsx can't run code with endent HOT 3
- Is Bundle / Compile command planned? HOT 1
- Regression with MikroORM introduced with tsx v4.9.1 HOT 2
- Regression in 4.9.1 βΒ Cannot find module (β¦) Did you mean to import "β¦.js"? HOT 2
- Modules imported dynamically from an absolute path are not loaded/handled by tsx v4.9.1 HOT 3
- π Logo early preview and feedback
- `node:assert`'s `assert.ok(false)` is really slow when using tsx HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsx.