mirror of
https://github.com/go-task/task.git
synced 2025-07-13 01:30:33 +02:00
Documentation improvements
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
# Task - A task runner / simpler Make alternative written in Go
|
# Task - A task runner / simpler Make alternative written in Go
|
||||||
|
|
||||||
Task is a simple tool that allows you to easily run development and build
|
Task is a simple tool that allows you to easily run development and build
|
||||||
tasks. Task is written in Golang, but can be used to develop any language.
|
tasks. Task is written in Go, but can be used to develop any language.
|
||||||
It aims to be simpler and easier to use then [GNU Make][make].
|
It aims to be simpler and easier to use then [GNU Make][make].
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
# Task - A task runner / simpler Make alternative written in Go
|
# Task
|
||||||
|
|
||||||
|
A task runner / simpler Make alternative written in Go
|
||||||
|
|
||||||
Task is a simple tool that allows you to easily run development and build
|
Task is a simple tool that allows you to easily run development and build
|
||||||
tasks. Task is written in Golang, but can be used to develop any language.
|
tasks. Task is written in Go, but can be used to develop any language.
|
||||||
It aims to be simpler and easier to use then [GNU Make][make].
|
It aims to be simpler and easier to use then [GNU Make][make].
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
See [Installation](INSTALLATION) and [Getting Started](USAGE#getting-started).
|
|
||||||
|
|
||||||
[make]: https://www.gnu.org/software/make/
|
[make]: https://www.gnu.org/software/make/
|
||||||
|
@ -1,36 +1,8 @@
|
|||||||
# [Installation](installation)
|
- [Installation](installation)
|
||||||
|
- [Usage](usage)
|
||||||
- [Go](INSTALLATION#go)
|
- [Taskfile Versions](taskfile_versions)
|
||||||
- [Homebrew](INSTALLATION#homebrew)
|
- [Examples](examples)
|
||||||
- [Snap](INSTALLATION#snap)
|
- [Releasing Task](releasing_task)
|
||||||
- [Binary](INSTALLATION#binary)
|
- [Alternative Task Runners](alternative_task_runners)
|
||||||
- [Install script](INSTALLATION#install-script)
|
- [Sponsors and Backers](sponsors_and_backers)
|
||||||
|
- [Github](https://github.com/go-task/task)
|
||||||
# [Usage](usage)
|
|
||||||
|
|
||||||
- [Getting started](USAGE#getting-started)
|
|
||||||
- [Environment](USAGE#environment)
|
|
||||||
- [OS specific task](USAGE#os-specific-task)
|
|
||||||
- [Task directory](USAGE#task-directory)
|
|
||||||
- [Task dependencies](USAGE#task-dependencies)
|
|
||||||
- [Calling another task](USAGE#calling-another-task)
|
|
||||||
- [Prevent unnecessary work](USAGE#prevent-unnecessary-work)
|
|
||||||
- [Variables](USAGE#variables)
|
|
||||||
- [Dynamic variables](USAGE#dynamic-variables)
|
|
||||||
- [Go's template engine](USAGE#gos-template-engine)
|
|
||||||
- [Help](USAGE#help)
|
|
||||||
- [Silent mode](USAGE#silent-mode)
|
|
||||||
- [Dry run mode](USAGE#dry-run-mode)
|
|
||||||
- [Ignore errors](USAGE#ignore-errors)
|
|
||||||
- [Output syntax](USAGE#output-syntax)
|
|
||||||
- [Watch tasks](USAGE#watch-tasks-experimental)
|
|
||||||
|
|
||||||
# [Taskfile Versions](taskfile_versions)
|
|
||||||
|
|
||||||
# [Examples](examples)
|
|
||||||
|
|
||||||
# [Releasing Task](releasing_task)
|
|
||||||
|
|
||||||
# [Alternative Task Runners](alternative_task_runners)
|
|
||||||
|
|
||||||
# [Sponsors and Backers](sponsors_and_backers)
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
# Alternative task runners
|
# Alternative task runners
|
||||||
|
|
||||||
## YAML based:
|
## YAML based
|
||||||
|
|
||||||
- [rliebz/tusk][tusk]
|
- [rliebz/tusk][tusk]
|
||||||
|
|
||||||
## Go based:
|
## Go based
|
||||||
|
|
||||||
- [magefile/mage][mage]
|
- [magefile/mage][mage]
|
||||||
|
|
||||||
## Make similar:
|
## Make similar
|
||||||
|
|
||||||
- [casey/just][just]
|
- [casey/just][just]
|
||||||
|
|
||||||
|
BIN
docs/favicon.ico
Normal file
BIN
docs/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
@ -2,13 +2,11 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Document</title>
|
<title>Task</title>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
<meta name="description" content="Description">
|
<meta name="description" content="Description">
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css"> -->
|
<link rel="stylesheet" href="//unpkg.com/docsify-themeable/dist/css/theme-simple.css">
|
||||||
<!-- <link rel="stylesheet" href="//unpkg.com/docsify-themeable/dist/css/theme-simple-dark.css"> -->
|
|
||||||
<link rel="stylesheet" href="https://unpkg.com/docsify-themeable/dist/css/theme-simple.css">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
@ -17,10 +15,14 @@
|
|||||||
name: 'Task',
|
name: 'Task',
|
||||||
repo: 'go-task/task',
|
repo: 'go-task/task',
|
||||||
themeColor: '#83d0f2',
|
themeColor: '#83d0f2',
|
||||||
loadSidebar: true
|
loadSidebar: true,
|
||||||
|
auto2top: true,
|
||||||
|
maxLevel: 3,
|
||||||
|
subMaxLevel: 3
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||||
|
<script src="//unpkg.com/docsify-themeable"></script>
|
||||||
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
|
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
|
||||||
<script src="//unpkg.com/prismjs/components/prism-yaml.min.js"></script>
|
<script src="//unpkg.com/prismjs/components/prism-yaml.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -33,7 +33,7 @@ executable called must be available by the OS or in PATH.
|
|||||||
|
|
||||||
If you ommit a task name, "default" will be assumed.
|
If you ommit a task name, "default" will be assumed.
|
||||||
|
|
||||||
### Environment
|
## Environment
|
||||||
|
|
||||||
You can specify environment variables that are added when running a command:
|
You can specify environment variables that are added when running a command:
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ tasks:
|
|||||||
hallo: welt
|
hallo: welt
|
||||||
```
|
```
|
||||||
|
|
||||||
### OS specific task
|
## OS specific task
|
||||||
|
|
||||||
If you add a `Taskfile_{{GOOS}}.yml` you can override or amend your Taskfile
|
If you add a `Taskfile_{{GOOS}}.yml` you can override or amend your Taskfile
|
||||||
based on the operating system.
|
based on the operating system.
|
||||||
@ -86,7 +86,7 @@ It's also possible to have an OS specific `Taskvars.yml` file, like
|
|||||||
`Taskvars_windows.yml`, `Taskfile_linux.yml`, or `Taskvars_darwin.yml`. See the
|
`Taskvars_windows.yml`, `Taskfile_linux.yml`, or `Taskvars_darwin.yml`. See the
|
||||||
[variables section](#variables) below.
|
[variables section](#variables) below.
|
||||||
|
|
||||||
### Task directory
|
## Task directory
|
||||||
|
|
||||||
By default, tasks will be executed in the directory where the Taskfile is
|
By default, tasks will be executed in the directory where the Taskfile is
|
||||||
located. But you can easily make the task run in another folder informing
|
located. But you can easily make the task run in another folder informing
|
||||||
@ -103,7 +103,7 @@ tasks:
|
|||||||
- caddy
|
- caddy
|
||||||
```
|
```
|
||||||
|
|
||||||
### Task dependencies
|
## Task dependencies
|
||||||
|
|
||||||
You may have tasks that depend on others. Just pointing them on `deps` will
|
You may have tasks that depend on others. Just pointing them on `deps` will
|
||||||
make them run automatically before running the parent task:
|
make them run automatically before running the parent task:
|
||||||
@ -167,7 +167,7 @@ tasks:
|
|||||||
- echo {{.TEXT}}
|
- echo {{.TEXT}}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Calling another task
|
## Calling another task
|
||||||
|
|
||||||
When a task has many dependencies, they are executed concurrently. This will
|
When a task has many dependencies, they are executed concurrently. This will
|
||||||
often result in a faster build pipeline. But in some situations you may need
|
often result in a faster build pipeline. But in some situations you may need
|
||||||
@ -213,7 +213,7 @@ tasks:
|
|||||||
|
|
||||||
The above syntax is also supported in `deps`.
|
The above syntax is also supported in `deps`.
|
||||||
|
|
||||||
### Prevent unnecessary work
|
## Prevent unnecessary work
|
||||||
|
|
||||||
If a task generates something, you can inform Task the source and generated
|
If a task generates something, you can inform Task the source and generated
|
||||||
files, so Task will prevent to run them if not necessary.
|
files, so Task will prevent to run them if not necessary.
|
||||||
@ -295,7 +295,7 @@ up-to-date.
|
|||||||
Also, `task --status [tasks]...` will exit with a non-zero exit code if any of
|
Also, `task --status [tasks]...` will exit with a non-zero exit code if any of
|
||||||
the tasks are not up-to-date.
|
the tasks are not up-to-date.
|
||||||
|
|
||||||
### Variables
|
## Variables
|
||||||
|
|
||||||
When doing interpolation of variables, Task will look for the below.
|
When doing interpolation of variables, Task will look for the below.
|
||||||
They are listed below in order of importance (e.g. most important first):
|
They are listed below in order of importance (e.g. most important first):
|
||||||
@ -357,7 +357,7 @@ DEV_MODE: production
|
|||||||
GIT_COMMIT: {sh: git log -n 1 --format=%h}
|
GIT_COMMIT: {sh: git log -n 1 --format=%h}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Variables expansion
|
### Variables expansion
|
||||||
|
|
||||||
Variables are expanded 2 times by default. You can change that by setting the
|
Variables are expanded 2 times by default. You can change that by setting the
|
||||||
`expansions:` option. Change that will be necessary if you compose many
|
`expansions:` option. Change that will be necessary if you compose many
|
||||||
@ -381,7 +381,7 @@ tasks:
|
|||||||
- echo "{{.FOOBARBAZ}}"
|
- echo "{{.FOOBARBAZ}}"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Dynamic variables
|
### Dynamic variables
|
||||||
|
|
||||||
The below syntax (`sh:` prop in a variable) is considered a dynamic variable.
|
The below syntax (`sh:` prop in a variable) is considered a dynamic variable.
|
||||||
The value will be treated as a command and the output assigned. If there is one
|
The value will be treated as a command and the output assigned. If there is one
|
||||||
@ -401,7 +401,7 @@ tasks:
|
|||||||
|
|
||||||
This works for all types of variables.
|
This works for all types of variables.
|
||||||
|
|
||||||
### Go's template engine
|
## Go's template engine
|
||||||
|
|
||||||
Task parse commands as [Go's template engine][gotemplate] before executing
|
Task parse commands as [Go's template engine][gotemplate] before executing
|
||||||
them. Variables are accessible through dot syntax (`.VARNAME`).
|
them. Variables are accessible through dot syntax (`.VARNAME`).
|
||||||
@ -458,7 +458,7 @@ tasks:
|
|||||||
{{end}}EOF
|
{{end}}EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
### Help
|
## Help
|
||||||
|
|
||||||
Running `task --list` (or `task -l`) lists all tasks with a description.
|
Running `task --list` (or `task -l`) lists all tasks with a description.
|
||||||
The following taskfile:
|
The following taskfile:
|
||||||
|
Reference in New Issue
Block a user