oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.16k stars 2.77k forks source link

Bun without Typescript #6079

Open sprkv5 opened 1 year ago

sprkv5 commented 1 year ago

Discussed in https://github.com/oven-sh/bun/discussions/5168

Originally posted by **sprkv5** September 13, 2023 I want to use plain JavaScript (via ReScript). Thus I don't want Typescript to be added to the `peerDependencies` for a new bun project created via `bun init`. Can there be a mode to support languages that compile to JavaScript? This also means, having an equivalent of bun-types for ReScript, which can be built by that community. So bun-types might also not be required. I want to initiate a discussion on how ReScript/ReasonML/etc. could be minimally supported as secondary languages. ```sh $ bun init bun init helps you get started with a minimal project and tries to guess sensible defaults. Press ^C anytime to quit package name (test): entry point (index.ts): index.js Done! A package.json file was saved in the current directory. + index.js + jsconfig.json (for editor auto-complete) + README.md To get started, run: bun run index.js $ vi package.json { "name": "test", "module": "index.js", "type": "module", "devDependencies": { "bun-types": "latest" }, "peerDependencies": { "typescript": "^5.0.0" } } ```
sprkv5 commented 1 year ago

kindly add feature request / enhancement label

trnxdev commented 1 year ago

I think a great solution is to ask "Do you want TypeScript? (y/n)" after asking for the entry point. And make y by default