github.com/ngsalvo/datastar-rick-and-morty@v0.0.0-20250318143428-01c52f047cfc/Taskfile.yml (about)

     1  version: '3'
     2  
     3  env:
     4    STATIC_DIR: 'static/styles'
     5  
     6  vars:
     7    NAME: 'RICK_AND_MORTY'
     8    VERSION: 'v0.0.1'
     9    TEMPL_VERSION: 'v0.3.819'
    10    AIR_VERSION: 'v1.61.5'
    11  
    12  tasks:
    13    build:templ:
    14      env:
    15        TEMPL_EXPERIMENT: rawgo
    16      cmds:
    17        - go run github.com/a-h/templ/cmd/templ@{{.TEMPL_VERSION}} generate -v
    18  
    19    build:styles:
    20      cmds:
    21        - pnpm dlx tailwindcss@3.4.17 -c tailwind.config.js -i $STATIC_DIR/main.css -o $STATIC_DIR/styles.css
    22  
    23    build:
    24      cmds:
    25        - go build -o cmd/{{.NAME}} .
    26      deps:
    27        - build:styles
    28        - build:templ
    29  
    30    debug:
    31      cmds:
    32        - go run github.com/go-delve/delve/cmd/dlv@v1.23.1 exec ./cmd/{{.NAME}}
    33      deps:
    34        - build
    35  
    36    live:templ:
    37      env:
    38        TEMPL_EXPERIMENT: rawgo
    39      cmds:
    40        - go run github.com/a-h/templ/cmd/templ@{{.TEMPL_VERSION}} generate --watch --proxy="http://localhost:3000" --open-browser=false -v
    41  
    42    live:styles:
    43      cmds:
    44        - pnpm dlx tailwindcss@3.4.17 -c tailwind.config.js -i $STATIC_DIR/main.css -o $STATIC_DIR/styles.css --watch
    45  
    46    live:server:
    47      cmds:
    48        - |
    49          go run github.com/air-verse/air@{{.AIR_VERSION}} \
    50          --build.cmd "go build -tags dev -o cmd/{{.NAME}}" \
    51          --build.bin "cmd/{{.NAME}}" \
    52          --build.delay "20" \
    53          --build.exclude_dir "node_modules,data,public,assets,tmp,vendor,testdata" \
    54          --build.include_ext "go,tpl,tmpl,templ,html" \
    55          --build.stop_on_error "false" \
    56          --misc.clean_on_exit true
    57  
    58    live:sync_static:
    59      cmds:
    60        - |
    61          go run github.com/air-verse/air@{{.AIR_VERSION}} \
    62          --build.cmd "go run github.com/a-h/templ/cmd/templ@{{.TEMPL_VERSION}} generate --notify-proxy" \
    63          --build.bin "true" \
    64          --build.delay "100" \
    65          --build.exclude_dir "" \
    66          --build.include_dir "$STATIC_DIR" \
    67          --build.include_ext "js,css"
    68  
    69    live:
    70      deps:
    71        - live:templ
    72        - live:server
    73        - live:styles
    74        - live:sync_static
    75  
    76    run:
    77      cmds:
    78        - ./cmd/{{.NAME}}
    79      deps:
    80        - build