diff --git a/src/cakefile.coffee b/src/cakefile.coffee index 4c47b69..4729f7f 100644 --- a/src/cakefile.coffee +++ b/src/cakefile.coffee @@ -8,7 +8,7 @@ option "-m", "--map", "Whether to generate source maps." task "build", "Builds the project.", (options) -> sourcemaps = if options.map then ["--map"] else [] - run "coffee", "--compile", sourcemaps..., "--no-header", "--output", "lib", "src" + npx "coffee", "--compile", sourcemaps..., "--no-header", "--output", "lib", "src" task "clean", "Deletes all generated files.", -> rmSync join("lib", file) for file from readdirSync "lib" when not file.endsWith ".d.ts" @@ -28,12 +28,12 @@ task "publish", "Publishes the package.", -> task "test", "Runs the test suite.", -> env.NODE_ENV = "test" - run "coffee", "--compile", "--map", "--no-header", "--output", "lib", "src", "test" + npx "coffee", "--compile", "--map", "--no-header", "--output", "lib", "src", "test" run "node", "--enable-source-maps", "--test", "--test-reporter=spec", "lib/**/*_test.js" task "watch", "Watches for file changes.", (options) -> sourcemaps = if options.map then ["--map"] else [] - run "coffee", "--compile", sourcemaps..., "--no-header", "--output", "lib", "--watch", "src", "test" + npx "coffee", "--compile", sourcemaps..., "--no-header", "--output", "lib", "--watch", "src", "test" # Executes a command from a local package. npx = (command, args...) -> run "npm", "exec", "--", command, args...