Skip to content

About

A Node.js package setup with types.d.ts (TypeScript typings) generated from JSDoc annotations

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

47 Commits

Folders and files

Repository files navigation

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.

About

A Node.js package setup with types.d.ts (TypeScript typings) generated from JSDoc annotations

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages