-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync.js
More file actions
28 lines (21 loc) · 944 Bytes
/
sync.js
File metadata and controls
28 lines (21 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const path = require('path')
const execa = require('execa')
const rsync = (from, to) => execa('rsync', ['-achuv', from, to], { stdio: 'inherit' })
async function main() {
await Promise.all(
[
['./node_modules/@tarojsx/history/README.md', './docs/history/README.md'],
['./node_modules/@tarojsx/hooks/docs', './docs/hooks'],
['./node_modules/@tarojsx/hooks/README.md', './docs/hooks/README.md'],
['./node_modules/@tarojsx/library/docs', './docs/library'],
['./node_modules/@tarojsx/library/README.md', './docs/library/README.md'],
['./node_modules/@tarojsx/polyfill/README.md', './docs/polyfill/README.md'],
['./node_modules/@tarojsx/ui/docs', './docs/ui'],
['./node_modules/@tarojsx/ui/README.md', './docs/ui/README.md'],
].map(p => rsync(...p))
)
}
main().then(
() => process.exit(0),
() => process.exit(1)
)