mirror of
https://github.com/go-task/task.git
synced 2025-05-13 22:16:31 +02:00
use custom alias
This commit is contained in:
parent
9d67d2688d
commit
0983882ff3
@ -2,7 +2,7 @@
|
|||||||
slug: '/experiments/env-precedence'
|
slug: '/experiments/env-precedence'
|
||||||
---
|
---
|
||||||
|
|
||||||
import AvailableSinceBadge from '../../src/components/AvailableSince';
|
import AvailableSinceBadge from '~/components/AvailableSince';
|
||||||
|
|
||||||
# Env Precedence (#1038)
|
# Env Precedence (#1038)
|
||||||
<AvailableSinceBadge version="v3.39.0" />
|
<AvailableSinceBadge version="v3.39.0" />
|
||||||
|
@ -3,7 +3,7 @@ slug: /getting-started/
|
|||||||
sidebar_position: 3
|
sidebar_position: 3
|
||||||
---
|
---
|
||||||
|
|
||||||
import AvailableSinceBadge from '../src/components/AvailableSince';
|
import AvailableSinceBadge from '~/components/AvailableSince';
|
||||||
|
|
||||||
# Getting Started
|
# Getting Started
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ slug: /taskfile-versions/
|
|||||||
sidebar_position: 6
|
sidebar_position: 6
|
||||||
---
|
---
|
||||||
|
|
||||||
import AvailableSinceBadge from '../src/components/AvailableSince';
|
import AvailableSinceBadge from '~/components/AvailableSince';
|
||||||
|
|
||||||
# Taskfile Versions
|
# Taskfile Versions
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ slug: /usage/
|
|||||||
sidebar_position: 4
|
sidebar_position: 4
|
||||||
---
|
---
|
||||||
|
|
||||||
import AvailableSinceBadge from '../src/components/AvailableSince';
|
import AvailableSinceBadge from '~/components/AvailableSince';
|
||||||
import Tabs from '@theme/Tabs';
|
import Tabs from '@theme/Tabs';
|
||||||
import TabItem from '@theme/TabItem';
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ const config: Config = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
plugins: [require.resolve('./plugins/webpack-alias-plugin')],
|
||||||
|
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
@ -67,10 +68,7 @@ const config: Config = {
|
|||||||
blogSidebarCount: 'ALL'
|
blogSidebarCount: 'ALL'
|
||||||
},
|
},
|
||||||
theme: {
|
theme: {
|
||||||
customCss: [
|
customCss: ['./src/css/custom.css', './src/css/carbon.css']
|
||||||
'./src/css/custom.css',
|
|
||||||
'./src/css/carbon.css',
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
gtag: {
|
gtag: {
|
||||||
trackingID: 'G-4RT25NXQ7N',
|
trackingID: 'G-4RT25NXQ7N',
|
||||||
@ -81,7 +79,7 @@ const config: Config = {
|
|||||||
priority: 0.5,
|
priority: 0.5,
|
||||||
ignorePatterns: ['/tags/**']
|
ignorePatterns: ['/tags/**']
|
||||||
}
|
}
|
||||||
} satisfies Preset.Options,
|
} satisfies Preset.Options
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -125,38 +123,38 @@ const config: Config = {
|
|||||||
{
|
{
|
||||||
type: 'docsVersionDropdown',
|
type: 'docsVersionDropdown',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
dropdownActiveClassDisabled: true,
|
dropdownActiveClassDisabled: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: GITHUB_URL,
|
href: GITHUB_URL,
|
||||||
title: 'GitHub',
|
title: 'GitHub',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
className: "header-icon-link icon-github",
|
className: 'header-icon-link icon-github'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: DISCORD_URL,
|
href: DISCORD_URL,
|
||||||
title: 'Discord',
|
title: 'Discord',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
className: "header-icon-link icon-discord",
|
className: 'header-icon-link icon-discord'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: TWITTER_URL,
|
href: TWITTER_URL,
|
||||||
title: 'X (Twitter)',
|
title: 'X (Twitter)',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
className: "header-icon-link icon-twitter",
|
className: 'header-icon-link icon-twitter'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: BLUESKY_URL,
|
href: BLUESKY_URL,
|
||||||
title: 'Bluesky',
|
title: 'Bluesky',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
className: "header-icon-link icon-bluesky",
|
className: 'header-icon-link icon-bluesky'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: MASTODON_URL,
|
href: MASTODON_URL,
|
||||||
title: 'Mastodon',
|
title: 'Mastodon',
|
||||||
rel: 'me',
|
rel: 'me',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
className: "header-icon-link icon-mastodon",
|
className: 'header-icon-link icon-mastodon'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -232,9 +230,9 @@ const config: Config = {
|
|||||||
theme: lightCodeTheme,
|
theme: lightCodeTheme,
|
||||||
darkTheme: darkCodeTheme,
|
darkTheme: darkCodeTheme,
|
||||||
additionalLanguages: [
|
additionalLanguages: [
|
||||||
"bash", // aka. shell
|
'bash', // aka. shell
|
||||||
"json",
|
'json',
|
||||||
"powershell"
|
'powershell'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// NOTE(@andreynering): Don't worry, these keys are meant to be public =)
|
// NOTE(@andreynering): Don't worry, these keys are meant to be public =)
|
||||||
@ -243,7 +241,7 @@ const config: Config = {
|
|||||||
apiKey: '34b64ae4fc8d9da43d9a13d9710aaddc',
|
apiKey: '34b64ae4fc8d9da43d9a13d9710aaddc',
|
||||||
indexName: 'taskfile'
|
indexName: 'taskfile'
|
||||||
}
|
}
|
||||||
} satisfies Preset.ThemeConfig,
|
} satisfies Preset.ThemeConfig
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
16
website/plugins/webpack-alias-plugin/index.js
Normal file
16
website/plugins/webpack-alias-plugin/index.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = function webpackAliasPlugin(context, options) {
|
||||||
|
return {
|
||||||
|
name: 'webpack-alias-plugin',
|
||||||
|
configureWebpack(config, isServer, utils) {
|
||||||
|
return {
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'~': path.resolve(__dirname, '../../src'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "@docusaurus/tsconfig",
|
"extends": "@docusaurus/tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": "."
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"~/*": ["src/*"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
slug: '/experiments/env-precedence'
|
slug: '/experiments/env-precedence'
|
||||||
---
|
---
|
||||||
|
|
||||||
# Env Precedence (#1038)
|
import AvailableSinceBadge from '~/components/AvailableSince';
|
||||||
|
|
||||||
|
# Env Precedence (#1038)
|
||||||
|
<AvailableSinceBadge version="v3.39.0" />
|
||||||
:::caution
|
:::caution
|
||||||
|
|
||||||
All experimental features are subject to breaking changes and/or removal _at any
|
All experimental features are subject to breaking changes and/or removal _at any
|
||||||
|
@ -3,6 +3,8 @@ slug: /getting-started/
|
|||||||
sidebar_position: 3
|
sidebar_position: 3
|
||||||
---
|
---
|
||||||
|
|
||||||
|
import AvailableSinceBadge from '~/components/AvailableSince';
|
||||||
|
|
||||||
# Getting Started
|
# Getting Started
|
||||||
|
|
||||||
The following guide will help introduce you to the basics of Task. We'll cover
|
The following guide will help introduce you to the basics of Task. We'll cover
|
||||||
@ -18,8 +20,13 @@ Once Task is installed, you can create your first Taskfile by running:
|
|||||||
task --init
|
task --init
|
||||||
```
|
```
|
||||||
|
|
||||||
This will create a file called `Taskfile.yml` in the current directory. If you
|
This will create a file called `Taskfile.yml` in the current directory.
|
||||||
want to create the file in another directory, you can pass an absolute or
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<AvailableSinceBadge version="v3.42.0" />
|
||||||
|
|
||||||
|
If you want to create the file in another directory, you can pass an absolute or
|
||||||
relative path to the directory into the command:
|
relative path to the directory into the command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@ -33,6 +40,9 @@ the file:
|
|||||||
task --init Custom.yml
|
task --init Custom.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
This will create a Taskfile that looks something like this:
|
This will create a Taskfile that looks something like this:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -21,7 +21,7 @@ If `--` is given, all remaining arguments will be assigned to a special
|
|||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
| Short | Flag | Type | Default | Description |
|
| Short | Flag | Type | Default | Description |
|
||||||
| ----- | --------------------------- | -------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|-------|-----------------------------|----------|----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. |
|
| `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. |
|
||||||
| `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. |
|
| `-C` | `--concurrency` | `int` | `0` | Limit number tasks to run concurrently. Zero means unlimited. |
|
||||||
| `-d` | `--dir` | `string` | Working directory | Sets the directory in which Task will execute and look for a Taskfile. |
|
| `-d` | `--dir` | `string` | Working directory | Sets the directory in which Task will execute and look for a Taskfile. |
|
||||||
@ -48,7 +48,7 @@ If `--` is given, all remaining arguments will be assigned to a special
|
|||||||
| `-t` | `--taskfile` | `string` | | Taskfile path to run.<br />Check the list of default filenames [here](../usage/#supported-file-names). |
|
| `-t` | `--taskfile` | `string` | | Taskfile path to run.<br />Check the list of default filenames [here](../usage/#supported-file-names). |
|
||||||
| `-v` | `--verbose` | `bool` | `false` | Enables verbose mode. |
|
| `-v` | `--verbose` | `bool` | `false` | Enables verbose mode. |
|
||||||
| | `--version` | `bool` | `false` | Show Task version. |
|
| | `--version` | `bool` | `false` | Show Task version. |
|
||||||
| `-w` | `--watch` | `bool` | `false` | Enables watch of the given task.
|
| `-w` | `--watch` | `bool` | `false` | Enables watch of the given task. |
|
||||||
|
|
||||||
## Exit Codes
|
## Exit Codes
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ slug: /taskfile-versions/
|
|||||||
sidebar_position: 6
|
sidebar_position: 6
|
||||||
---
|
---
|
||||||
|
|
||||||
|
import AvailableSinceBadge from '~/components/AvailableSince';
|
||||||
|
|
||||||
# Taskfile Versions
|
# Taskfile Versions
|
||||||
|
|
||||||
The Taskfile schema slowly changes as new features are added and old ones are
|
The Taskfile schema slowly changes as new features are added and old ones are
|
||||||
@ -56,6 +58,8 @@ Instead, we should start the file like this:
|
|||||||
version: '3.17'
|
version: '3.17'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<AvailableSinceBadge version="v3.34.0" />
|
||||||
|
|
||||||
Now when someone tries to run the Taskfile with an older version of Task, they
|
Now when someone tries to run the Taskfile with an older version of Task, they
|
||||||
will receive an error prompting them to upgrade their version of Task to
|
will receive an error prompting them to upgrade their version of Task to
|
||||||
`v3.17.0` or greater.
|
`v3.17.0` or greater.
|
||||||
|
@ -3,6 +3,7 @@ slug: /usage/
|
|||||||
sidebar_position: 4
|
sidebar_position: 4
|
||||||
---
|
---
|
||||||
|
|
||||||
|
import AvailableSinceBadge from '~/components/AvailableSince';
|
||||||
import Tabs from '@theme/Tabs';
|
import Tabs from '@theme/Tabs';
|
||||||
import TabItem from '@theme/TabItem';
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
@ -311,6 +312,8 @@ includes:
|
|||||||
|
|
||||||
### Flatten includes
|
### Flatten includes
|
||||||
|
|
||||||
|
<AvailableSinceBadge version="v3.39.0" />
|
||||||
|
|
||||||
You can flatten the included Taskfile tasks into the main Taskfile by using the `flatten` option.
|
You can flatten the included Taskfile tasks into the main Taskfile by using the `flatten` option.
|
||||||
It means that the included Taskfile tasks will be available without the namespace.
|
It means that the included Taskfile tasks will be available without the namespace.
|
||||||
|
|
||||||
@ -1100,7 +1103,7 @@ variable types are supported:
|
|||||||
- `int`
|
- `int`
|
||||||
- `float`
|
- `float`
|
||||||
- `array`
|
- `array`
|
||||||
- `map`
|
- `map` <AvailableSinceBadge version="v3.43.1" />
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
|
|
||||||
@ -1373,6 +1376,7 @@ tasks:
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Looping over a matrix
|
### Looping over a matrix
|
||||||
|
<AvailableSinceBadge version="v3.39.0" />
|
||||||
|
|
||||||
If you need to loop over all permutations of multiple lists, you can use the
|
If you need to loop over all permutations of multiple lists, you can use the
|
||||||
`matrix` property. This should be familiar to anyone who has used a matrix in a
|
`matrix` property. This should be familiar to anyone who has used a matrix in a
|
||||||
@ -1447,7 +1451,7 @@ tasks:
|
|||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="2" label="Generates">
|
<TabItem value="2" label="Generates">
|
||||||
|
<AvailableSinceBadge version="v3.43.1" />
|
||||||
```yaml
|
```yaml
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
@ -1495,7 +1499,7 @@ tasks:
|
|||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="2" label="Generates">
|
<TabItem value="2" label="Generates">
|
||||||
|
<AvailableSinceBadge version="v3.43.1" />
|
||||||
```yaml
|
```yaml
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user