Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #614 #615

Merged
merged 1 commit into from
Apr 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tools/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ async function copy({ watch } = {}) {
const watcher = await new Promise((resolve, reject) => {
gaze('src/content/**/*.*', (err, val) => err ? reject(err) : resolve(val));
});
watcher.on('changed', async (file) => {
const cp = async (file) => {
const relPath = file.substr(path.join(__dirname, '../src/content/').length);
await ncp(`src/content/${relPath}`, `build/content/${relPath}`);
});
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semicolon?

watcher.on('changed', cp);
watcher.on('added', cp);
}
}

Expand Down