Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

dtb

1.0.1 • Public • Published

🛠 dev-[toolbox] 🛠

Travis CI - Build Status Dependencies Coveralls - Code Coverage Status JavaScript Style Guide PRs Welcome

The useful development toolbox for Node.js packages.

Installation

# Using NPM 
npm install dtb --save-dev
 
# Using Yarn 
yarn add dtb --dev

Usage

The server module:

const toolbox = require('dtb')
const server = toolbox.server
 
// ...
 
// get a free port
const freePort = await server.getPort()
 
// ...
 
// start a temporary server
const temp = await server.startTempServer()
 
console.log('temp started', temp.host, temp.port)
 
// stop the temporary server
await temp.stop()

For more check out the docs, source, and tests.


The files module:

const toolbox = require('dtb')
const files = toolbox.files
 
// ...
 
// get the normalized path
files.path('/../src/')
 
// get the normalized path relative to your project's root directory
files.root('/src')

For more check out the docs, source, and tests.

Contribution

Any contribution is appreciated. To get going, check out the contribution guidelines, then the development manual. Thank you, have fun!

License

MIT @ Richard Szakacs

Install

npm i dtb

DownloadsWeekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

16.2 kB

Total Files

8

Last publish

Collaborators

  • avatar