0.2.0 • Published 8 years ago

leancloud-vue-boilerplate v0.2.0

Weekly downloads
2
License
BSD-2-Clause
Repository
github
Last release
8 years ago

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:

  1. Node 6.x | Express 4.x
  2. LeanCloud integration (compatible with LeanEngine 1.x)
  3. Webpack (with hot reloading)
  4. express-validation | Joi (powerful request validation)
  5. Ava (asynchronous test runner)
  6. Bunyan for logging (with global variable Logger)
  7. Database seeding example (see folder scripts/seed)

Client:

  1. Vue.js 1.x (with plugins vue-resource and vue-router)
  2. Semantic UI (for user interface)
  3. Babel (transform ES6 for browsers)
  4. SASS support (with autoprefixer)

Editor:

  1. Visual Studio Code configurations
  2. Typings definitions for intellisense
  3. 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

License

BSD license