Git Product home page Git Product logo

esbuild-typescript-vscode-template's Introduction

esbuild-typescript-vscode-template

πŸ”° The esbuild & TypeScript template for debugging by VSCode πŸ”°

πŸ“› How to build

Install requirements including esbuild .

npm install

Build the sample TypeScript source.

npm run build

It will generate dist/index.cjs .

Run output. It execute node dist/index.cjs .

npm run exe

πŸ”΄ How to debug by VSCode

Recommended: auto-build

Start watching.

npm run watch

It will automatically generate the output for every file change.

Set breakpoints anywhere you like.

Press F5 ( Debug: continue ). It launch "Launch Program" in .vscode/launch.json .

If it will stop at the breakpoints, the setup is completed.

sample break points

Not recommended: manual-build

Enable the comment-outed lines in .vscode/launch.json .

    // Enable if you don't use `watch` mode.
    // "preLaunchTask": "npm: build-debug",

It will execute the build task for each debug ( F5 ).

This method does not use watch mode of esbuild. This would be useful in some cases. For example, cases where you want to control the build timing.

πŸ’  Appendix: Application to Node single executable applications

Node single executable applications can use only single JavaScript file. It cannot use multiple JavaScript files. And of course, it cannot use the npm packages...

Bundlers can solve this problem by bundle the multiple JavaScript files and npm packages into a single file. esbuild also bundle multiple TypeScript files and npm packages into single JavaScript file❗

This repository helps development of single executable applications by making debug easy❗

esbuild-typescript-vscode-template's People

Contributors

tenpamk2 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.