1.0.1 • Published 6 years ago

dtb v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

🛠 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