5
GitHub - bitair-org/node-lift: Power up Node.js
source link: https://github.com/bitair-org/node-lift
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Repository files navigation
Power up Node.js for building reliable applications.
Features
- TypeScript importer (both CommonJS and ES module systems)
- Test runner (integration with the built-in Node.js test runner)
- Linter (type, syntax, style and documentation checking)
- Formatter
- Monorepo manager
- Runtime type checker
- Centralized error handler
- Performance profiler
- Memory leak detector
Hello World!
Save and run the hello world script to see Lift in action:
Usage:
npm i -S @bitair/lift
Import
// Filename must be explicitly prefixed with '.ts' or '.mts' or '.cts'
import { func } from './sample_module.ts'
Create a tsconfig.json
file at the root of your repository with the following content:
{
"extends": "@bitair/lift/tsconfig",
"include": [/*Filenames or patterns to be included. Cannot be empty*/],
"exclude": [/*Filenames or patterns to be excluded. Can be empty*/]
}
npx lift lint
npx lift test test/*.ts
package.json
{
"main" : "src/index.ts"
}
npx lift run .
Notes
- The
lint
subcommand uses theeslint
command with a default config file and--ext .ts
arg. To override these, set the--config
and--ext
args again. Other options of theeslint
command can be passed as well. - The
test
subcommand uses thenode
command with the--test
arg. Other options of thenode
command can be passed as well. - Args must be placed after the
lint
,run
, andtest
subcommands.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK