This is a pretty heavily opinionated boilerplate designed to tackle some of the problems I've encountered when trying to spin up a vue project. This project does not use the vue-cli, as I think(?) I still prefer the older way of setting up a project. I've tried to include a few features that I've always wished I had integrated earlier when starting a project.
The current version of vue-3-boilerplate
contains the following features:
- Store / LocalStorage access via vuex
- Routing via vue-router
- Localization via vue-i18n
- Basic Light/Dark mode via sass mixin
- Bundling and Dev Server via webpack 5
Once the project has been cloned, install all dependent node packages via
npm i
Additionally, the following node commands can be used to test, deploy and lint the project:
npm run build
Builds the project for production. Will minify, uglify, and bundle the project. Source maps will not be included. Bundled code can be found in /dist/
.
npm run preview
Builds the project for production, and serves the /dist
directory using http-server
. Used to preview bundled and production ready code.
npm run start
Builds the project for development and serves it via the Webpack 5 Dev Server. Code is not uglified, and in-line source maps are included. Uses the .env
value DEV_SERVER_PORT
to determine hosted port.
npm run lint
Lints the project via eslint.
npm run lint-style
Lints the project via stylelint with the standards stylelint-config-standard and stylelint-config-standard-scss.