Node.js TypeScript boilerplate project.
- Node v16+
- ES Modules
- TypeScript 3 project references for source and tests
- Scripts for development, testing, linting, and building
- Github Actions
For Web components projects, see node-mean-template-wc
Description | Uploaded to Git | Uploaded to npm | |
---|---|---|---|
src |
TypeScript source | ✅ | ❌ |
tests |
TypeScript tests | ✅ | ❌ |
dist |
Compiled JavaScript, type definition files | ❌ | ✅ |
dist_tests |
Compiled JavaScript tests | ❌ | ❌ |
This project uses daizong to manage scripts. You need to run scripts via
npx daizong <script>
ordz <script>
(if you installed daizong globally).
dz dev
starts dev mode, which watches and compiles all source files including test files.dz t
runs tests in dev mode.
You can keep two terminal tabs during development, one for dz dev
, the other for dz t
.
dz build
cleans, lints, compiles the project and runs tests.
You do not need to manually run these scripts. They are integrated into other scripts.
dz lint
lints the project using ESLint, auto triggered bydz build
.dz clean
deletes all build artifacts, auto triggered bydz dev
ordz build
.
The prepublishOnly
package.json
script was removed as we now recommend using np to publish packages. np
automatically runs npm test
, which runs dz build
before publishing.
Replace __PKG_NAME__
with your package name:
[![Build Status](https://github.com/mgenware/__PKG_NAME__/workflows/Build/badge.svg)](https://github.com/mgenware/__PKG_NAME__/actions)
[![MEAN Module](https://img.shields.io/badge/MEAN%20Module-TypeScript-blue.svg?style=flat-square)](https://github.com/mgenware/__PKG_NAME__)
[![npm version](https://img.shields.io/npm/v/__PKG_NAME__.svg?style=flat-square)](https://npmjs.com/package/__PKG_NAME__)
[![Node.js Version](http://img.shields.io/node/v/__PKG_NAME__.svg?style=flat-square)](https://nodejs.org/en/)