1
0
mirror of https://github.com/go-task/task.git synced 2025-03-17 21:08:01 +02:00

Documentation improvements

This commit is contained in:
Andrey Nering 2018-09-23 15:06:43 -03:00
parent 9ee224c36b
commit 4aa1e8b093
7 changed files with 34 additions and 62 deletions

View File

@ -3,7 +3,7 @@
# Task - A task runner / simpler Make alternative written in Go
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].
---

View File

@ -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
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].
---
See [Installation](INSTALLATION) and [Getting Started](USAGE#getting-started).
[make]: https://www.gnu.org/software/make/

View File

@ -1,36 +1,8 @@
# [Installation](installation)
- [Go](INSTALLATION#go)
- [Homebrew](INSTALLATION#homebrew)
- [Snap](INSTALLATION#snap)
- [Binary](INSTALLATION#binary)
- [Install script](INSTALLATION#install-script)
# [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)
- [Installation](installation)
- [Usage](usage)
- [Taskfile Versions](taskfile_versions)
- [Examples](examples)
- [Releasing Task](releasing_task)
- [Alternative Task Runners](alternative_task_runners)
- [Sponsors and Backers](sponsors_and_backers)
- [![Github](https://icongram.jgog.in/simple/github.svg?color=808080&size=16)Github](https://github.com/go-task/task)

View File

@ -1,14 +1,14 @@
# Alternative task runners
## YAML based:
## YAML based
- [rliebz/tusk][tusk]
## Go based:
## Go based
- [magefile/mage][mage]
## Make similar:
## Make similar
- [casey/just][just]

BIN
docs/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View File

@ -2,13 +2,11 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<title>Task</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<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">
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.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">
<link rel="stylesheet" href="//unpkg.com/docsify-themeable/dist/css/theme-simple.css">
</head>
<body>
<div id="app"></div>
@ -17,10 +15,14 @@
name: 'Task',
repo: 'go-task/task',
themeColor: '#83d0f2',
loadSidebar: true
loadSidebar: true,
auto2top: true,
maxLevel: 3,
subMaxLevel: 3
}
</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-yaml.min.js"></script>
</body>

View File

@ -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.
### Environment
## Environment
You can specify environment variables that are added when running a command:
@ -48,7 +48,7 @@ tasks:
hallo: welt
```
### OS specific task
## OS specific task
If you add a `Taskfile_{{GOOS}}.yml` you can override or amend your Taskfile
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
[variables section](#variables) below.
### Task directory
## Task directory
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
@ -103,7 +103,7 @@ tasks:
- caddy
```
### Task dependencies
## Task dependencies
You may have tasks that depend on others. Just pointing them on `deps` will
make them run automatically before running the parent task:
@ -167,7 +167,7 @@ tasks:
- echo {{.TEXT}}
```
### Calling another task
## Calling another task
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
@ -213,7 +213,7 @@ tasks:
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
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
the tasks are not up-to-date.
### Variables
## Variables
When doing interpolation of variables, Task will look for the below.
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}
```
#### Variables expansion
### Variables expansion
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
@ -381,7 +381,7 @@ tasks:
- echo "{{.FOOBARBAZ}}"
```
#### Dynamic variables
### Dynamic variables
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
@ -401,7 +401,7 @@ tasks:
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
them. Variables are accessible through dot syntax (`.VARNAME`).
@ -458,7 +458,7 @@ tasks:
{{end}}EOF
```
### Help
## Help
Running `task --list` (or `task -l`) lists all tasks with a description.
The following taskfile: