0.2.0 • Published 7 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 moduleInstallation
npm install --save @hotwire/screwdriveryarn add @hotwire/screwdriverHacking
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 testsThese should be run with yarn;
yarn lintCoverage
To get code coverage, first install nyc globally using your preferred package manager;
npm install -g nycyarn global add nycThen run yarn test using nyc to get coverage output;
nyc yarn testLicense
@hotwire/screwdriver is licensed under the MIT license.