Skip to content

Commit 381472a

Browse files
committed
Format files on commit
1 parent 66a0a68 commit 381472a

File tree

10 files changed

+163
-42
lines changed

10 files changed

+163
-42
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run format

.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"trailingComma": "es5",
3+
"semi": true,
4+
"singleQuote": true,
5+
"useTabs": true,
6+
"printWidth": 100,
7+
"proseWrap": "always"
8+
}

README.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
11
# Taskfile
22

3-
A `./Taskfile` is a task runner in plain and easy [Bash](https://nl.wikipedia.org/wiki/Bash). It adds a list of available tasks to your project.
3+
A `./Taskfile` is a task runner in plain and easy [Bash](https://nl.wikipedia.org/wiki/Bash). It
4+
adds a list of available tasks to your project.
45

56
![CLI Taskfile preview](./images/cli-preview.gif)
67

78
## Why
89

9-
- Works on any OS (any bash terminal)
10-
- A uniform way to run your projects
11-
- Very easy to use
12-
- Automate your most common tasks (updating, starting, building, etc...)
13-
- Easy to understand and maintain
10+
- Works on any OS (any bash terminal)
11+
- A uniform way to run your projects
12+
- Very easy to use
13+
- Automate your most common tasks (updating, starting, building, etc...)
14+
- Easy to understand and maintain
1415

1516
# Create your own taskfile
1617

17-
This project gives you a `Taskfile` base, and gives you a collection of usefull tasks to help out on your project.
18+
This project gives you a `Taskfile` base, and gives you a collection of usefull tasks to help out on
19+
your project.
1820

19-
- [The Taskfile base](./taskfile-base.md)
21+
- [The Taskfile base](./taskfile-base.md)
2022

21-
We strongly recommend that your project uses a project section containing a `init` and a `update` task. Check out our
22-
example:
23+
We strongly recommend that your project uses a project section containing a `init` and a `update`
24+
task. Check out our example:
2325

24-
- [Project section](./section/project.md)
26+
- [Project section](./section/project.md)
2527

2628
## Usefull tasks
2729

2830
Check out the following sections for tasks that could be helpfull for your project's Taskfile:
2931

30-
- [Docker](./section/docker.md)
31-
- [GitHub](./section/github.md)
32-
- [GitLab](./section/gitlab.md)
32+
- [Docker](./section/docker.md)
33+
- [GitHub](./section/github.md)
34+
- [GitLab](./section/gitlab.md)
3335

3436
# Credits
3537

36-
This Taskfile setup is based on [Adrian Cooney's Taskfile setup](https://github.com/adriancooney/Taskfile) and
38+
This Taskfile setup is based on
39+
[Adrian Cooney's Taskfile setup](https://github.com/adriancooney/Taskfile) and
3740
[Enrise](https://enrise.com) their internal implementation of the Taskfile.
3841

3942
# Contribute
4043

41-
Feel free to add your own Taskfile tasks via a PR. The more usefull tasks, the easier we make the life of other
42-
developers.
44+
Feel free to add your own Taskfile tasks via a PR. The more usefull tasks, the easier we make the
45+
life of other developers.

package-lock.json

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "@futureportal/taskfile",
3+
"version": "1.0.0",
4+
"description": "A ./Taskfile is a task runner in plain and easy Bash. It adds a list of available tasks to your project.",
5+
"scripts": {
6+
"format": "prettier --write .",
7+
"prepare": "husky install"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/FuturePortal/Taskfile.git"
12+
},
13+
"keywords": [
14+
"bash",
15+
"cli",
16+
"automation",
17+
"makefile",
18+
"task-runner",
19+
"taskfile"
20+
],
21+
"authors": [
22+
{
23+
"name": "Rick van der Staaij",
24+
"url": "https://rick.nu"
25+
},
26+
{
27+
"name": "Contributors",
28+
"url": "https://github.com/FuturePortal/Taskfile/graphs/contributors"
29+
}
30+
],
31+
"license": "MIT",
32+
"bugs": {
33+
"url": "https://github.com/FuturePortal/Taskfile/issues"
34+
},
35+
"homepage": "https://github.com/FuturePortal/Taskfile#readme",
36+
"devDependencies": {
37+
"husky": "^8.0.1",
38+
"prettier": "^2.7.1"
39+
}
40+
}

section/github.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GitHub
22

3-
If you use GitHub and want an easy way to check out Pull Requests locally,
4-
`task:pr` is a great addition to your project section in the Taskfile.
3+
If you use GitHub and want an easy way to check out Pull Requests locally, `task:pr` is a great
4+
addition to your project section in the Taskfile.
55

66
```bash
77
# ===========================

section/gitlab.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# GitLab
22

3-
If you use GitLab and want an easy way to check out Merge Requests locally,
4-
`task:mr` is a great addition to your project section in the Taskfile.
3+
If you use GitLab and want an easy way to check out Merge Requests locally, `task:mr` is a great
4+
addition to your project section in the Taskfile.
55

66
```bash
77
# ===========================

section/project.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Project section
22

3-
A project section can be very usefull to quickly get your project up and running,
4-
including the latest changes. A common practice is to include a `task:init` to get your
5-
entire project up and running with a single command, and a `task:update` to make sure everything
6-
is up to date.
3+
A project section can be very usefull to quickly get your project up and running, including the
4+
latest changes. A common practice is to include a `task:init` to get your entire project up and
5+
running with a single command, and a `task:update` to make sure everything is up to date.
76

87
```bash
98
# ===========================

taskfile-base.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# The Taskfile base
22

3-
Below is the Taskfile base we recommend you use. Below we will explain what sections are in the base and why.
3+
Below is the Taskfile base we recommend you use. Below we will explain what sections are in the base
4+
and why.
45

56
```bash
67
#!/bin/bash
@@ -67,14 +68,15 @@ banner
6768

6869
## Banner
6970

70-
By default we include a banner in your Taskfile. In the base you have a pretty ascii art of "Taskfile", but we recommend
71-
you replace this with your own project title. You can use http://patorjk.com/software/taag/ for that.
71+
By default we include a banner in your Taskfile. In the base you have a pretty ascii art of
72+
"Taskfile", but we recommend you replace this with your own project title. You can use
73+
http://patorjk.com/software/taag/ for that.
7274

7375
## Title
7476

75-
In order to give all the tasks a pretty and clear structre, a title function is added that we recommend you use at
76-
the start of every task. This will create a nice divider and let your user know that your Taskfile is about to start
77-
a new process.
77+
In order to give all the tasks a pretty and clear structre, a title function is added that we
78+
recommend you use at the start of every task. This will create a nice divider and let your user know
79+
that your Taskfile is about to start a new process.
7880

7981
```bash
8082
function task:my-new-task { ## My new task example
@@ -85,24 +87,27 @@ function task:my-new-task { ## My new task example
8587

8688
## Help section
8789

88-
A help section for your Taskfile is generated automatically. This is done by scanning the Taskfile itself, and checking
89-
if a line contains `##` (double comment). When it finds a `##`, it will either use the line as a new section in the
90-
help overview, or when it's combined with a `function task:* { ## Descriptoin` then the comment will be used as the
91-
task description. Using this will give your user a clear overview of what tasks can be run.
90+
A help section for your Taskfile is generated automatically. This is done by scanning the Taskfile
91+
itself, and checking if a line contains `##` (double comment). When it finds a `##`, it will either
92+
use the line as a new section in the help overview, or when it's combined with a
93+
`function task:* { ## Descriptoin` then the comment will be used as the task description. Using this
94+
will give your user a clear overview of what tasks can be run.
9295

9396
## PATH
9497

9598
In the taskfile base, you see that the PATH variable is updated with an additional path
96-
(`PATH=./node_modules/.bin:$PATH`). In this example `./node_modules/.bin` is added to the bash PATH variable. For
97-
example, if you have a `eslint` binary in that folder, you can now call `eslint --fix .` directly from your tasks,
98-
instead of having to call `./node_modules/.bin/eslint --fix .`. If you don't need it, remove it. If you need to include
99-
a different binary path, update it.
99+
(`PATH=./node_modules/.bin:$PATH`). In this example `./node_modules/.bin` is added to the bash PATH
100+
variable. For example, if you have a `eslint` binary in that folder, you can now call
101+
`eslint --fix .` directly from your tasks, instead of having to call
102+
`./node_modules/.bin/eslint --fix .`. If you don't need it, remove it. If you need to include a
103+
different binary path, update it.
100104

101105
## Shorthand
102106

103-
If you're a lazy developer (that's a good thing, trust me), you're probably already tired of having to type
104-
`./Taskfile <task>` all the time. The `task:shorthand` gives you a quick and easy option to create a `task` binary on
105-
your system, so you can use `task <task>` in the future. It will look for a `Taskfile` in the current directory.
107+
If you're a lazy developer (that's a good thing, trust me), you're probably already tired of having
108+
to type `./Taskfile <task>` all the time. The `task:shorthand` gives you a quick and easy option to
109+
create a `task` binary on your system, so you can use `task <task>` in the future. It will look for
110+
a `Taskfile` in the current directory.
106111

107112
# Adding relevant tasks
108113

0 commit comments

Comments
 (0)