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

[ documentation ] Taskfile as an alternative to Ninja #61

Open
yonas opened this issue Jul 30, 2024 · 0 comments
Open

[ documentation ] Taskfile as an alternative to Ninja #61

yonas opened this issue Jul 30, 2024 · 0 comments

Comments

@yonas
Copy link

yonas commented Jul 30, 2024

Doc page: https://docs.ruuda.nl/rcl/using_ninja/

Task is a lot easier than Ninja. Here's an example:

Prevent unnecessary work

By fingerprinting locally generated files and their sources

If a task generates something, you can inform Task the source and generated files, so Task will prevent running them if not necessary.

version: '3'

tasks:
  build:
    deps: [js, css]
    cmds:
      - go build -v -i main.go

  js:
    cmds:
      - esbuild --bundle --minify js/index.js > public/bundle.js
    sources:
      - src/js/**/*.js
    generates:
      - public/bundle.js

  css:
    cmds:
      - esbuild --bundle --minify css/index.css > public/bundle.css
    sources:
      - src/css/**/*.css
    generates:
      - public/bundle.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant