duxphp / duxravel-static
Duxravel 前端库
dev-main
2024-04-18 03:27 UTC
This package is auto-updated.
Last update: 2024-09-18 04:18:31 UTC
README
适用于 duxravel 配套后台前端代码
项目安装
yarn install
本地调试
yarn serve
编译版本
yarn build
文件校验
yarn lint
实时编译(Duxravel)
在本地开发时,如果您需要 duxravel-static
与 duxravel
主项目(即您的业务项目)实时编译并生效,可以按照以下步骤简单实现:
- 在您的业务项目的
composer.json
中添加如下配置
"repositories": { "duxphp/duxravel-static": { "type": "path", "url": "/path/to/your/local/duxravel-static", "options": { "symlink": true } } },
-
在您的业务项目根目录下,执行
composer update -vv
或者composer require duxphp/duxravel-static -vv
-
在
duxravel-static
中创建.env.local
文件并添加环境变量:
DUXRAVEL_PROJECT_ROOT = '/path/to/your/duxravel'
DUXRAVEL_PROJECT_ROOT
的值为您的业务项目根目录
- 在
duxravel-static
终端启动yarn build -w
终端输出如下日志,即表明成功。然后您可以任意修改前端源文件试试。
INFO Publishing [duxravel] assets. Copying directory [/path/to/github.com/duxphp/duxravel-static/dist/static/manage] to [public/static/manage] ........................ DONE Copying directory [/path/to/github.com/duxphp/duxravel-static/dist/static/tinymce] to [public/static/tinymce] ...................... DONE Copying file [/path/to/github.com/duxphp/duxravel-static/dist/manifest.json] to [public/static/manage-manifest.json] ............... DONE