File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,22 @@ function project:install-dependencies {
44
44
npm install
45
45
}
46
46
47
+ function task:prettify { # # Prettify all files
48
+ title " Cleaning codestyle"
49
+ echo " Prettifying files..."
50
+ prettier --write --list-different .
51
+ echo " Done."
52
+ }
53
+
54
+ # =========================================================
55
+ # # Automation
56
+ # =========================================================
57
+
58
+ function task:pre-commit { # # Clean up code before committing
59
+ task:prettify
60
+ title " Comitting"
61
+ }
62
+
47
63
# =========================================================
48
64
# # Taskfile
49
65
# =========================================================
Original file line number Diff line number Diff line change 3
3
"version" : " 1.0.0" ,
4
4
"description" : " A ./Taskfile is a task runner in plain and easy Bash. It adds a list of available tasks to your project." ,
5
5
"scripts" : {
6
- "format" : " prettier --write . " ,
6
+ "format" : " ./Taskfile pre-commit " ,
7
7
"prepare" : " husky install"
8
8
},
9
9
"repository" : {
You can’t perform that action at this time.
0 commit comments