Skip to content

Commit

Permalink
fix: await copying of files in create command (#1461)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForsakenHarmony committed Oct 30, 2020
1 parent c72600a commit 6670ba0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-eggs-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"preact-cli": patch
---

fix: await copying of files in create command
4 changes: 2 additions & 2 deletions packages/cli/lib/commands/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,12 @@ module.exports = async function (repo, dest, argv) {
join('..', 'resources', 'template.html')
);
const templateDest = join(sourceDirectory, 'template.html');
copyFileToDestination(templateSrc, templateDest);
await copyFileToDestination(templateSrc, templateDest);

// Copy over sw.js
const serviceWorkerSrc = resolve(__dirname, join('..', '..', 'sw', 'sw.js'));
const serviceWorkerDest = join(sourceDirectory, 'sw.js');
copyFileToDestination(serviceWorkerSrc, serviceWorkerDest);
await copyFileToDestination(serviceWorkerSrc, serviceWorkerDest);

if (argv.install) {
spinner.text = 'Installing dependencies:\n';
Expand Down

0 comments on commit 6670ba0

Please sign in to comment.