duxphp/duxravel-static

Duxravel 前端库

Installs: 929

Dependents: 2

Suggesters: 0

Security: 0

Stars: 4

Watchers: 2

Forks: 6

Open Issues: 0

Language:JavaScript

dev-main 2024-04-18 03:27 UTC

This package is auto-updated.

Last update: 2024-12-18 04:54:34 UTC


README

适用于 duxravel 配套后台前端代码

中文文档 | 配套后端

Packagist

项目安装

yarn install

本地调试

yarn serve

编译版本

yarn build

检验文件

yarn lint

实时编译(Duxravel)

本地开发时,如需 duxravel-staticduxravel 主项目(即您的业务项目)实时编译并生效,可按如下几步简便实现:

  1. 在您的业务项目 composer.json 添加如下配置
    "repositories": {
        "duxphp/duxravel-static": {
            "type": "path",
            "url": "/path/to/your/local/duxravel-static",
            "options": {
                "symlink": true
            }
        }
    },
  1. 在您的业务项目根目录下,执行 composer update -vv 或者 composer require duxphp/duxravel-static -vv

  2. duxravel-static 创建 .env.local 文件并添加环境变量:

DUXRAVEL_PROJECT_ROOT = '/path/to/your/duxravel'

DUXRAVEL_PROJECT_ROOT 值为您的业务项目根目录

  1. 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