Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created November 24, 2017 09:51
Show Gist options
  • Save ccapndave/148159eaa5849eb40addeb11906d97ff to your computer and use it in GitHub Desktop.
Save ccapndave/148159eaa5849eb40addeb11906d97ff to your computer and use it in GitHub Desktop.
// This works
Sparky.task("copy:assets", () => Sparky.watch("./assets/**/*", { base: homeDir }).dest("./dist"));
Sparky.task("copy:vendor", () => Sparky.watch("./vendor/**/*", { base: homeDir }).dest("./dist"));
Sparky.task("copy:index", () => Sparky.watch("./index.html", { base: homeDir }).dest("./dist"));
Sparky.task("copy", ["copy:assets", "copy:vendor", "copy:index"], () => {});
// But this doesn't
Sparky.task("copy", () => {
return Promise.all([
Sparky.watch("./assets/**/*", { base: homeDir }).dest("./dist"),
Sparky.watch("./vendor/**/*", { base: homeDir }).dest("./dist"),
Sparky.watch("./index.html", { base: homeDir }).dest("./dist")
]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment