elma.dev - Can ELMA 10月02日 20:52
Just工具:简化项目命令行操作
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了Just工具,它作为shell与项目之间的抽象层,通过简化命令行操作,帮助用户更便捷地运行项目命令。

Every project has its own specific requirements. Most of the time, we can meet this need with commands. But when it comes to writing and running commands, sometimes shell scripts can be a bit low level.

This is where just handles the situation better. It functions as an abstract layer between your shell and the project and helps you run commands in a handy way. You can think of it like Makefile. But unlike Makefile, just files are more readable and easier to write.

Installation

You can find OS-specific installation instructions on its GitHub page.

A sample justfile

The configuration files for the just tool are named justfile by default. Below is an example justfile:

justfile
test:  echo 'Testing!'build target:  @echo 'Building {{target}}...'  cd {{target}} && make

In the above example, there's the test and build commands. You can pass a target parameter to the build command. Did you notice the @ character in the @echo statement? just prints each command to standard error before running it. This is suppressed for lines starting with @.

$ just testecho 'Testing!'Testing!

More...

It's better not to get into giving more examples as it has too many features. You can check it out on its GitHub repo by clicking on here.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Just工具 命令行操作 项目配置
相关文章