hnhdigital-os / fs-tasker
任务器
1.2.0
2021-03-29 00:30 UTC
Requires
- php: ^7.3|^8.0
- composer/semver: ^3.0
- laminas/laminas-text: ^2.7
- matthiasmullie/minify: ^1.3
- scssphp/scssphp: ^1.0
- symfony/yaml: ^5.0
Requires (Dev)
- laravel-zero/framework: ^8.0
- mockery/mockery: ^1.0
- phpunit/phpunit: ^9.3
README
提供一个顺序任务运行器。任务和配置通过简单的yaml配置文件提供。
提供以下任务插件:
- 合并
- 复制
- 创建
- 清空
- 执行
- 替换文本
- 修订
- SASS
此包由澳大利亚精品开发商H&H|Digital开发。访问我们的网站 hnh.digital。
要求
- PHP 7.3.0(最小版本)
安装
通过命令行
curl -o fs-tasker-installer.sh -sL https://hnhdigital-os.github.io/fs-tasker/builds/install
sudo bash fs-tasker-installer.sh && unlink fs-tasker-installer.sh
或者,下载最新构建版本
curl -o ./fs-tasker -LsS https://github.com/hnhdigital-os/fs-tasker/raw/master/builds/fs-tasker
chmod a+x ./fs-tasker
将其移动到本地bin
sudo mv ./fs-tasker /usr/local/bin/fs-tasker
更新
此工具提供自动更新机制。只需运行自动更新命令。
fs-tasker self-update
如何使用
fs-tasker <command> [options] [arguments]
配置 (.tasker.config.yml)
使用YAML的任务配置示例。
tasker: version: 1.2.0 environments: - dev - staging - prod options: aliases: SASS: resources/assets/sass NODE: node_modules ASSETS: public/assets BUILD: public/build VENDOR: vendor RESOURCES: resources VIEWS: resources/views IMAGES: resources/assets/images VENDOR_ASSETS: resources/assets/vendor tasks: - name: Yarn Install plugin: exec environments: - staging - prod executable: yarn arguments: install - name: Tailwind CSS plugin: exec executable: npx arguments: tailwind build $RESOURCES + /css/styles.css -o $ASSETS + /output.css - name: Create folders plugin: create paths: - $ASSETS?ignore - $BUILD?ignore - name: Empty folders plugin: empty paths: - $ASSETS?ignore - $BUILD?ignore - name: Copy assets plugin: copy paths: $NODE + /jquery/dist/jquery.js: $ASSETS + /vendor/jquery.js $NODE + /components-jqueryui/jquery-ui.js: $ASSETS + /vendor/jquery-ui.js $NODE + /components-jqueryui/themes/smoothness/**: $ASSETS + /vendor/jquery-ui/themes/smoothness/ $NODE + /font-awesome/css/all.css: $ASSETS + /vendor/fontawesome.css $NODE + /font-awesome/webfonts/**: $ASSETS + /webfonts/ $RESOURCES + /js/test.js: $ASSETS + /js/test.js $IMAGES+/**?extensions=png,gif: $ASSETS+/images/ $VIEWS + /**?extensions=css,js: $ASSETS?remove_extension_folder - name: Replace text plugin: replace_text src: $ASSETS + /js/test.js find: This is some text to replace replace: Text has been replaced extensions: - js - name: Create autoinit plugin: combine output: $ASSETS + /vendor/autoinit.js paths: - $VENDOR + /hnhdigital-os/laravel-frontend-asset-loader/js/** - $VENDOR + /hnhdigital-os/laravel-frontend-assets/js/** - name: Process sass plugin: sass src: $RESOURCES + /sass/app.scss dest: $ASSETS + /app.css import-paths: - $NODE source-map: path: $ASSETS + /app.map - name: Revision assets plugin: revision cache: true minify: true src: $ASSETS dest: $BUILD manifest: formats: json: $BUILD + /rev-manifest.json php: config/rev-manifest.php
贡献
请参阅 CONTRIBUTING 了解详细信息。
致谢
许可
MIT许可证(MIT)。有关更多信息,请参阅 许可文件。