Skip to content

Latest commit

 

History

History
72 lines (47 loc) · 2.17 KB

README.md

File metadata and controls

72 lines (47 loc) · 2.17 KB

test

Node.js module with TypeScript typings (types.d.ts) generated from JSDoc

Example repo for a Node.js module with TypeScript typings (./types.d.ts) generated from JSDoc annotations.

Project setup, files/directories of interest are ./src/main.js, ./tests and ./types.d.ts.

├── LICENSE
├── README.md
├── node_modules
│   └── ...
├── package.json
├── src
│   └── main.js
├── tests
│   └── ping.js
├── types.d.ts
└── yarn.lock

Comes ready to develop with:

Quickstart

Use the GitHub "Template" functionality or clone the repo (take care to remove the .git folder in that case).

Contributing

Requirements

  • Node 12
  • Yarn 1.x or npm

Setup

  1. Clone the repository
  2. Run yarn or npm install installs all required dependencies.

npm scripts

Equivalent npm run <script> should also work

  • yarn test run tests with ava.
  • yarn build will run JSDoc -> TypeScript typing conversion with jsdoc and tsd-jsdoc, changes to ./types.d.ts shoud be committed.
  • yarn lint will lint all of the files with xo
  • yarn format will run lint with --fix option on all the examples files (and tests).

About

This package is maintained by Hugo from Code with Hugo and Alpine.js Weekly.

Acknowledgments

Special thanks to:

LICENSE

Code is licensed under the MIT License.