benmanu/recipe-vue-cli

此包最新版本(dev-master)的许可证信息不可用。

SilverStripe 4 网站的 Vue CLI 食谱

安装: 24

依赖者: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 1

开放问题: 0

语言:JavaScript

类型:silverstripe-recipe

dev-master 2018-11-06 00:57 UTC

This package is auto-updated.

Last update: 2024-09-06 14:43:46 UTC


README

为 SilverStripe 4 网站提供了一种有见地的前端构建方案。添加了一个包含所有源文件的新主题 app。使用 Vue CLI 来处理前端构建。有关详细信息,请参阅文档

安装

composer require-recipe benmanu/recipe-vue-cli

更新食谱

composer update-recipe benmanu/recipe-vue-cli

更新项目文件

以下是对项目的一些更改,以便让一切正常运行。

composer.json

将以下内容添加到项目的 composer.json 文件配置中

{
  "extra": {
    "expose": [
      "themes/app/dist"
    ]
  }
}

然后运行以将其同步到公共目录

composer vendor-expose

.editorconfig

添加以下内容

[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100

.gitignore

添加以下内容

.DS_Store
node_modules

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*

app/_config/theme.yml

替换为以下内容

---
Name: mytheme
---
SilverStripe\View\SSViewer:
  themes:
    - '$public'
    - 'app'
    - '$default'

指南

有关前端构建的更多信息,请参阅前端构建文档

有关编码约定等更多信息,请参阅前端开发文档