From 58d582941ba405e9bba77358530f56caef107a00 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sat, 4 Feb 2023 20:28:34 -0300 Subject: [PATCH] Documentation: Remove mentions of Minify in favor of esbuild --- docs/docs/usage.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/docs/docs/usage.md b/docs/docs/usage.md index 45f7bec9..1963c654 100644 --- a/docs/docs/usage.md +++ b/docs/docs/usage.md @@ -9,7 +9,7 @@ sidebar_position: 3 Create a file called `Taskfile.yml` in the root of your project. The `cmds` attribute should contain the commands of a task. -The example below allows compiling a Go app and uses [Minify][minify] to concat +The example below allows compiling a Go app and uses [esbuild](https://esbuild.github.io/) to concat and minify multiple CSS files into a single one. ```yaml @@ -22,7 +22,7 @@ tasks: assets: cmds: - - minify -o public/style.css src/css + - esbuild --bundle --minify css/index.css > public/bundle.css ``` Running the tasks is as simple as running: @@ -384,7 +384,7 @@ tasks: assets: cmds: - - minify -o public/style.css src/css + - esbuild --bundle --minify css/index.css > public/bundle.css ``` In the above example, `assets` will always run right before `build` if you run @@ -401,11 +401,11 @@ tasks: js: cmds: - - minify -o public/script.js src/js + - esbuild --bundle --minify js/index.js > public/bundle.js css: cmds: - - minify -o public/style.css src/css + - esbuild --bundle --minify css/index.css > public/bundle.css ``` If there is more than one dependency, they always run in parallel for better @@ -583,19 +583,19 @@ tasks: js: cmds: - - minify -o public/script.js src/js + - esbuild --bundle --minify js/index.js > public/bundle.js sources: - src/js/**/*.js generates: - - public/script.js + - public/bundle.js css: cmds: - - minify -o public/style.css src/css + - esbuild --bundle --minify css/index.css > public/bundle.css sources: - src/css/**/*.css generates: - - public/style.css + - public/bundle.css ``` `sources` and `generates` can be files or file patterns. When given, @@ -1059,11 +1059,11 @@ tasks: js: cmds: - - minify -o public/script.js src/js + - esbuild --bundle --minify js/index.js > public/bundle.js css: cmds: - - minify -o public/style.css src/css + - esbuild --bundle --minify css/index.css > public/bundle.css ``` would print the following output: @@ -1456,4 +1456,3 @@ either setting `interval: '500ms'` in the root of the Taskfile passing it as an argument like `--interval=500ms`. [gotemplate]: https://golang.org/pkg/text/template/ -[minify]: https://github.com/tdewolff/minify/tree/master/cmd/minify