benmanu / recipe-vue-cli
SilverStripe recipe for Vue CLI
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Language:JavaScript
Type:silverstripe-recipe
Requires
This package is auto-updated.
Last update: 2024-12-06 15:10:33 UTC
README
An opinionated frontend build for SilverStripe 4 sites. Adds a new theme app
containing all source files. Uses Vue CLI to handle the frontend build. See the docs for more details.
Installation
composer require-recipe benmanu/recipe-vue-cli
Update the recipe:
composer update-recipe benmanu/recipe-vue-cli
Update project files
These are some changes to make to the project to get everything up and running.
composer.json
Add the following to the project composer.json
file config:
{ "extra": { "expose": [ "themes/app/dist" ] } }
Then run to sync it to the public directory:
composer vendor-expose
.editorconfig
Add the following:
[*.{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
Add the following:
.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
Replace with the following:
--- Name: mytheme --- SilverStripe\View\SSViewer: themes: - '$public' - 'app' - '$default'
Guide
See the frontend build documentation for more information.
See the frontend development documentation for coding conventions etc.