0.2.0 • Published 5 years ago
@hotwire/screwdriver v0.2.0
@hotwire/screwdriver
Screwdriver is a tool for replacing the exports of modules at runtime.
Usage
const screwdriver = require('@hotwire/screwdriver');
screwdriver.insert('os', 'os :)');
console.log(require('os')); // "os :)"
screwdriver.remove('os');
console.log(require('os')); // the os module
Installation
npm install --save @hotwire/screwdriver
yarn add @hotwire/screwdriver
Hacking
The following scripts are available in screwdriver's package.json
;
lint → run the configured linters
format → fix any prettier lint failures
test → run the unit tests
These should be run with yarn
;
yarn lint
Coverage
To get code coverage, first install nyc
globally using your preferred package manager;
npm install -g nyc
yarn global add nyc
Then run yarn test
using nyc
to get coverage output;
nyc yarn test
License
@hotwire/screwdriver
is licensed under the MIT license.