All Projects → a7ul → Esbuild Node Tsc

a7ul / Esbuild Node Tsc

Licence: mit
Build your Typescript Node.js projects using blazing fast esbuild

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Esbuild Node Tsc

Yarneditor
A tool for writing interactive dialogue in games!
Stars: ✭ 292 (-33.64%)
Mutual labels:  development
Lab
React UI component design tool
Stars: ✭ 349 (-20.68%)
Mutual labels:  development
Php Parser
🌿 NodeJS PHP Parser - extract AST or tokens (PHP5 and PHP7)
Stars: ✭ 400 (-9.09%)
Mutual labels:  development
Awesome Standard
Documenting the explosion of packages in the standard ecosystem!
Stars: ✭ 300 (-31.82%)
Mutual labels:  development
Vim Iced
Clojure Interactive Development Environment for Vim8/Neovim
Stars: ✭ 343 (-22.05%)
Mutual labels:  development
Httplab
The interactive web server
Stars: ✭ 3,752 (+752.73%)
Mutual labels:  development
Psycopg3
New generation PostgreSQL database adapter for the Python programming language
Stars: ✭ 278 (-36.82%)
Mutual labels:  development
Emacs4developers
A document to help developers to use Emacs as a developer
Stars: ✭ 430 (-2.27%)
Mutual labels:  development
Developer Roadmap Guide 2018
Stars: ✭ 344 (-21.82%)
Mutual labels:  development
Eslint Plugin Testing Library
ESLint plugin to follow best practices and anticipate common mistakes when writing tests with Testing Library
Stars: ✭ 384 (-12.73%)
Mutual labels:  development
Webapp Checklist
Technical details that a programmer of a web application should consider before making the site public.
Stars: ✭ 320 (-27.27%)
Mutual labels:  development
Mdx Go
⚡️ Lightning fast MDX-based dev server for progressive documentation
Stars: ✭ 340 (-22.73%)
Mutual labels:  development
Buidl
A browser-based IDE for creating, deploying, and sharing blockchain apps (DApps, or decentralized apps). Publish your first blockchain DApps in 5 minutes! Here is how: https://docs.secondstate.io/buidl-developer-tool/getting-started
Stars: ✭ 376 (-14.55%)
Mutual labels:  development
Atheme
Atheme IRC Services
Stars: ✭ 297 (-32.5%)
Mutual labels:  development
Eslint Config Standard React
ESLint Shareable Config for React/JSX support in JavaScript Standard Style
Stars: ✭ 416 (-5.45%)
Mutual labels:  development
Streamsheets
An open-source tool for processing stream data using a spreadsheet-like interface.
Stars: ✭ 281 (-36.14%)
Mutual labels:  development
Js Dev Reads
A list of books 📚and articles 📝 for the discerning web developer to read.
Stars: ✭ 3,784 (+760%)
Mutual labels:  development
Coding Coach
This is the landing page :)
Stars: ✭ 438 (-0.45%)
Mutual labels:  development
Annotated Webpack Config
This is the companion github repo for the "An Annotated webpack 4 Config for Frontend Web Development" article.
Stars: ✭ 425 (-3.41%)
Mutual labels:  development
Snazzy
Format JavaScript Standard Style as Stylish (i.e. snazzy) output
Stars: ✭ 381 (-13.41%)
Mutual labels:  development

⚡️ esbuild-node-tsc

Build your Typescript Node.js projects using blazing fast esbuild.

Since esbuild can build large typescript node projects in subsecond speeds, this is quite useful for development builds too if you want to stick with tsc for production builds.

Please note this library doesnt do typechecking. For typechecking please continue to use tsc.

Alternatives

Recently, Many alternatives have been released that allow using esbuild with nodejs projects.

I would like to promote a few which I believe does a better job than this library. You should probably use/switch to them from now on.

How does it work?

esbuild-node-tsc reads the tsconfig.json and builds the typescript project using esbuild. esbuild is the fastest typescript builder around. It also copies the non ts files such as json, graphql files, images,etc to the dist folder. If the assets are not copied correctly check the configuration guide below.

Installation

npm install --save-dev esbuild-node-tsc

Usage

npx esbuild-node-tsc

or use the short form.

npx etsc

Additionally, you can add it to your build scripts

{
  "name": "myproject",
  "version": "0.1.0",
  "scripts": {
    "dev": "etsc" 
  }
}

Then just run

npm run dev

Live reloading (nodemon ❤️ esbuild-node-tsc)

Since esbuild can build large typescript projects in subsecond speeds you can use this library instead of ts-node-dev or ts-node which usually slow down when project scales.

To achieve live reloading:

npm install --save-dev nodemon esbuild-node-tsc

Then add the following script to package.json

{
  "name": "myproject",
  "version": "0.1.0",
  "scripts": {
    "dev": "nodemon"
  }
}

And add a nodemon.json

{
  "watch": ["src"],
  "ignore": ["src/**/*.test.ts"],
  "ext": "ts,mjs,js,json,graphql",
  "exec": "etsc && node ./dist/index.js",
  "legacyWatch": true
}

Finally run

npm run dev

Comparison with tsc

Optional configuration

By default esbuild-node-tsc should work out of the box for your project since it reads the necessary configuration from your tsconfig.json

But if things are not working as expected you can configure esbuild-node-tsc by adding etsc.config.js along side tsconfig.json.

Example etsc.config.js

module.exports = {
  outDir: "./dist",
  esbuild: {
    minify: false,
    target: "es2015",
  },
  assets: {
    baseDir: "src",
    filePatterns: ["**/*.json"],
  },
};

All of the above fields are optional

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].