Skip to content

Commit

Permalink
Code optimization [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Nov 7, 2024
1 parent 722d658 commit 57e835b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cakefile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ task "build", "Builds the project.", (options) ->
run "coffee", "--compile", sourcemaps..., "--no-header", "--output", "lib", "src"

task "clean", "Deletes all generated files.", ->
rmSync join("lib", file) for file in readdirSync "lib" when not file.endsWith ".d.ts"
rmSync join("var", file), recursive: yes for file in readdirSync "var" when file isnt ".gitkeep"
rmSync join("lib", file) for file from readdirSync "lib" when not file.endsWith ".d.ts"
rmSync join("var", file), recursive: yes for file from readdirSync "var" when file isnt ".gitkeep"

task "dist", "Packages the project.", ->
invoke script for script in ["clean", "build"]
invoke script for script from ["clean", "build"]
rmSync "lib/cakefile.js"

task "lint", "Performs the static analysis of source code.", ->
npx "coffeelint", "--file=etc/coffeelint.json", "example", "src", "test"

task "publish", "Publishes the package.", ->
invoke "dist"
run "npm", "publish", "--registry=#{registry}" for registry in ["https://registry.npmjs.org", "https://npm.pkg.github.com"]
run "git", action..., "v#{pkg.version}" for action in [["tag"], ["push", "origin"]]
run "npm", "publish", "--registry=#{registry}" for registry from ["https://registry.npmjs.org", "https://npm.pkg.github.com"]
run "git", action..., "v#{pkg.version}" for action from [["tag"], ["push", "origin"]]

task "test", "Runs the test suite.", ->
env.NODE_ENV = "test"
Expand Down

0 comments on commit 57e835b

Please sign in to comment.