Skip to content

maxgfr/typescript-swc-starter

 
 

Repository files navigation

typescript-swc-starter

A simple node boilerplate made in typescript using swc.

👻 A version without rust compiler swc is available here.

🤖 A more complex repository is available for creating npm package here.

👾 You can also use a branch which use dotenv here.

👽 Finally, there is a branch which generate commonjs file here.

Clone repository and install dependencies

git clone https://github.com/maxgfr/typescript-swc-starter # For cloning the repository
cd typescript-swc-starter # To navigate to the repository root
yarn # Install dependencies

Running the code

yarn build # For building the code with typechecking
yarn build:swc # For building without typechecking
yarn start # For running the code builded

Or in development mode:

yarn dev # For running the code in development thanks to swc and nodemon

⚠️ No typechecking made in dev mode

Testing the code

yarn test # For running unit test
yarn test:watch # For watching unit test