Skip to content

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

License

Notifications You must be signed in to change notification settings

HugoDF/jsdoc-type-d-ts-node-pkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Releases

No releases published

Packages

No packages published