We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7138755 commit 7e690d9Copy full SHA for 7e690d9
bin/watch.js
@@ -0,0 +1,25 @@
1
+const chokidar = require('chokidar');
2
+const fs = require('fs-extra');
3
+const path = require('path');
4
+
5
+const location = path.join(__dirname, '../src');
6
+const destination = path.join(location, '../example/react-native-markdown-renderer');
7
8
+const watcher = chokidar.watch(location);
9
+watcher.on('change', dir => {
10
11
12
+ console.log('Updating %s by removing it', destination);
13
14
+ fs.remove(destination, err => {
15
16
+ console.log('Copy %s ', location);
17
18
+ fs.copy(location, destination, err => {
19
+ if (err) return console.error(err)
20
21
+ console.log('to %s ', destination);
22
+ console.log('success!')
23
+ })
24
+ });
25
+});
0 commit comments