UNPKG

2.49 kBMarkdownView Raw
1ape-watching
2==========
3
4<!---
5This file is generated by ape-tmpl. Do not update manually.
6--->
7
8<!-- Badge Start -->
9<a name="badges"></a>
10
11[![Build Status][bd_travis_shield_url]][bd_travis_url]
12[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
13[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
14[![Dependency Status][bd_gemnasium_shield_url]][bd_gemnasium_url]
15[![npm Version][bd_npm_shield_url]][bd_npm_url]
16
17[bd_repo_url]: https://github.com/ape-repo/ape-watching
18[bd_travis_url]: http://travis-ci.org/ape-repo/ape-watching
19[bd_travis_shield_url]: http://img.shields.io/travis/ape-repo/ape-watching.svg?style=flat
20[bd_license_url]: https://github.com/ape-repo/ape-watching/blob/master/LICENSE
21[bd_codeclimate_url]: http://codeclimate.com/github/ape-repo/ape-watching
22[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/ape-repo/ape-watching.svg?style=flat
23[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/ape-repo/ape-watching.svg?style=flat
24[bd_gemnasium_url]: https://gemnasium.com/ape-repo/ape-watching
25[bd_gemnasium_shield_url]: https://gemnasium.com/ape-repo/ape-watching.svg
26[bd_npm_url]: http://www.npmjs.org/package/ape-watching
27[bd_npm_shield_url]: http://img.shields.io/npm/v/ape-watching.svg?style=flat
28[bd_bower_badge_url]: https://img.shields.io/bower/v/ape-watching.svg?style=flat
29
30<!-- Badge End -->
31
32
33<!-- Description Start -->
34<a name="description"></a>
35
36ape framework module for watching files.
37
38<!-- Description End -->
39
40
41
42
43<!-- Sections Start -->
44<a name="sections"></a>
45
46<!-- Section from "doc/readme/02.Usage.md.hbs" Start -->
47
48<a name="section-doc-readme-02-usage-md"></a>
49Usage
50----
51
52### Watch files.
53
54```javascript
55#!/usr/bin/env
56"use strict";
57
58const apeWatching = require('ape-watching');
59
60const watchers = apeWatching.watchFiles([
61 'src/javascripts/**/*.js',
62 'assets/javascripts/**/*.js'
63], (ev, filename) => {
64 /*...*/
65});
66
67
68setTimeout(() => {
69 watchers.forEach((watcher) => {
70 watcher.close(); // Stop watching
71 });
72}, 1000);
73```
74
75
76
77<!-- Section from "doc/readme/02.Usage.md.hbs" End -->
78
79
80<!-- Sections Start -->
81
82
83<!-- LICENSE Start -->
84<a name="license"></a>
85
86License
87-------
88This software is released under the [MIT License](https://github.com/ape-repo/ape-watching/blob/master/LICENSE).
89
90<!-- LICENSE End -->
91
92
93<!-- Links Start -->
94<a name="links"></a>
95
96Links
97------
98
99+ [ape-repo](https://github.com/ape-repo)
100
101<!-- Links End -->