leancloud-vue-boilerplate
v0.2.0
Published
LeanCloud Vue Boilerplate.
Downloads
4
Readme
LeanCloud Vue Boilerplate
This boilerplate contains some awesome new front-end technologies, like hot reloading and ES6.
This project is designed to be opinionated but robust enough to set up a website with common features like client-side rendering/routing, RESTful API, authentication, as well as data storage by using LeanCloud backend service.
For more, check out the full feature list below:
Features
Server:
- Node 6.x | Express 4.x
- LeanCloud integration (compatible with LeanEngine 1.x)
- Webpack (with hot reloading)
- express-validation | Joi (powerful request validation)
- Ava (asynchronous test runner)
- Bunyan for logging (with global variable
Logger
) - Database seeding example (see folder
scripts/seed
)
Client:
- Vue.js 1.x (with plugins vue-resource and vue-router)
- Semantic UI (for user interface)
- Babel (transform ES6 for browsers)
- SASS support (with autoprefixer)
Editor:
- Visual Studio Code configurations
- Typings definitions for intellisense
- ESLint
Application Structure
.
├── builder # Build/Start scripts
|
├── client # Application source code
│ ├── assets # Static assets
│ ├── components # Vue.js components
│ ├── extensions # Vue.js directives or service providers
│ ├── semantic # Semantic-UI related code
│ ├── UI # UI components
│ └── main.js # Application bootstrap
|
├── config # Project configuration settings
|
├── scripts # Common scripts
│ └── seed # Seeding scripts
|
├── server # Server source code
│ ├── api # Server API
│ ├── auth # Authentication middleware
│ ├── common # LeanEngine cloud functions
│ ├── lib # Server configuration
│ ├── models # Data models
│ ├── views # Server rendered views
│ └── index.js # Server application entry point
|
├── test # Unit tests
|
└── typings # Typings definitions
Installation
Make sure Node.js 6.x is installed and enabled in current shell.
git clone https://github.com/chuyik/LeanCloud-Vue-Boilerplate.git
cd LeanCloud-Vue-Boilerplate
npm install
Using Vue DevTools
Install Vue DevTools chrome extension and it just works.
Commands
# Run Dev (Autoreload)
npm run dev
# Stage Mode (Pre-production Testing)
npm run stage
# Start a Production Server
npm start
# Build Client Code with Webpack
npm run build
# Run Seeding Scripts
npm run seed
# Run Test
npm test