🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

typescript-swc-starter

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-swc-starter

A minimalist typescript swc starter

1.1.7
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

typescript-swc-starter

A simple node boilerplate made in typescript using swc which generates cjs and esm modules.

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

:warning: You have to use at least node@20 to run this project.

Commands

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

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

yarn lint # For linting the code
yarn lint:fix # For linting the code and fix issues

yarn build # For building the code (there is no typechecking due to swc compiler)
yarn type-check # For typechecking the code

yarn start:cjs # For running the code builded in cjs
yarn start:esm # For running the code builded in esm

Publish to npm

Set NPM_TOKEN in your Github actions secret, and that's it :)

Alt Text

To test this package, just do that :

import { sayHello } from 'typescript-swc-starter';
sayHello();

Keywords

boilerplate

FAQs

Package last updated on 19 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts