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
57var apeWatching = require('ape-watching');
58
59var watchers = apeWatching.watchFiles([
60 'src/javascripts/**/*.js',
61 'assets/javascripts/**/*.js'
62], function (ev, filename) {
63 /*...*/
64});
65
66
67setTimeout(function () {
68 watchers.forEach(function (watcher) {
69 watcher.close(); // Stop watching
70 });
71}, 1000);
72```
73
74
75
76<!-- Section from "doc/readme/02.Usage.md.hbs" End -->
77
78
79<!-- Sections Start -->
80
81
82<!-- LICENSE Start -->
83<a name="license"></a>
84
85License
86-------
87This software is released under the [MIT License](https://github.com/ape-repo/ape-watching/blob/master/LICENSE).
88
89<!-- LICENSE End -->
90
91
92<!-- Links Start -->
93<a name="links"></a>
94
95Links
96------
97
98+ [ape-repo](https://github.com/ape-repo)
99
100<!-- Links End -->