# quickscope

> Quickly react to dependecy changes

Latest version **0.3.0** (published 2016-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install quickscope
pnpm add quickscope
yarn add quickscope
bun add quickscope
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2016-09-19 |
| First published | 2015-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | kirstein |

## Links

- npm: https://www.npmjs.com/package/quickscope
- Repository: https://github.com/kirstein/quickscope
- Homepage: https://github.com/kirstein/quickscope#readme
- Issues: https://github.com/kirstein/quickscope/issues
- npm.io page: https://npm.io/package/quickscope

## Dependencies (7)

- [lodash](https://npm.io/package/lodash.md) ^4.5.1
- [chokidar](https://npm.io/package/chokidar.md) ^1.2.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [keymirror](https://npm.io/package/keymirror.md) ^0.1.1
- [cli-spinner](https://npm.io/package/cli-spinner.md) ^0.2.1
- [dependency-tree](https://npm.io/package/dependency-tree.md) ^5.6.1
- [find-project-root](https://npm.io/package/find-project-root.md) ^1.1.1

## Recent versions

- 0.3.0 (latest) — 2016-09-19
- 0.2.1 — 2015-10-23
- 0.2.0 — 2015-10-23
- 0.1.0 — 2015-09-05
- 0.0.0 — 2015-08-30

## README

# quickscope [![Build Status](https://secure.travis-ci.org/kirstein/quickscope.png?branch=master)](https://travis-ci.org/kirstein/quickscope)

> Quickly react to dependecy changes

### Huh?

Quickscope is a watcher that watches given `glob` and all its dependencies. This is absolutely perfect for test running (see [quickscope-cli](https://github.com/kirstein/quickscope-cli))

### Getting started

`npm install quickscope`

### API

```javascript
const Quickscope = require('quickscope');
let qs = new Quickscope('glob', [{ opts }]);

// Register to event
qs.on('event', function () {});
```

returns `quickscope` instance

##### Params

* **glob** - glob or file for watching (**required**)  
  *example*: `**/__tests__/*.js`

* **options** - additional options  
  cwd - cwd...

##### Methods

* **on** - registers for quickscope events

##### Events

* **ready** - all input files have gone through their initial load phase  
* **add** - target that matches the glob has been added
* **unlink** - target has been removed
* **change** - target or dependency has changed

### Example

```javascript
let quickscope = new Quickscope('**/__tests__/*.js');

quickscope.on('ready', function (files) {
  console.log('ready with targets', files);
});

quickscope.on('add', function (file) {
  console.log('Added new target', file);
});

quickscope.on('unlink', function (file) {
  console.log('Unlinked target', file);
});

quickscope.on('change', function (deps) {
  console.log('List of dependencies changed', deps);
});
```

### Testing 

```bash
npm test
```

## License

MIT

---
_Source: https://npm.io/package/quickscope · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
