Coder Social home page Coder Social logo

bxm0927 / vue-cli-template Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 536 KB

这是一个基于 Vue CLI v4 和 Vue v2 搭建的一个 Vue SPA 模板项目 📦

JavaScript 53.73% HTML 7.56% Vue 32.27% SCSS 4.15% Shell 0.45% Dockerfile 1.85%
vue vuecli vue-router vuex

vue-cli-template's Introduction

vue-cli-template

项目简介

这是一个基于 Vue CLI v4Vue v2 搭建的一个开箱即用的 Vue SPA 模板项目 📦

已经集成了以下功能:

  • Vuex: Vue.js 官方状态管理库
  • Vue Router: Vue.js 官方路由库,本项目使用 history 模式
  • axios: HTTP 客户端
  • Vant: 有赞前端团队开源的 Vue.js 移动端组件库,支持按需加载
  • postcss-px-to-viewport: 基于 Viewport 的移动端适配方案
  • Sass/SCSS (with node-sass): CSS Pre-processor
  • style-resources-loader: CSS Automatic imports
  • normalize.css: CSS resets
  • ESLint + Stylelint + Prettier: Linter / Formatter
  • husky + lint-staged: Git Hooks
  • Nginx + Jenkins + Docker: Deployment

以下功能尚未集成:

  • TypeScript
  • Unit Testing
  • E2E Testing
  • Progressive Web App (PWA) Support

Tips: 本项目默认为移动端模板项目,PC 端项目需要去掉 postcss-px-to-viewport,并将 Vant 替换为 Element UI.

快速开始

# install dependencies
npm install

# Compiles and hot-reloads for development
npm run serve

# Compiles and minifies for production
npm run build

# Lints and fixes files
npm run lint

部署

使用 Nginx + Docker 部署:

# Build Docker image
# docker build -t vue-cli-template .

# Run Docker image
# docker run -d -p 9000:80 vue-cli-template

# Run Docker image with Docker Compose
docker-compose up -d --build # or: npm run deploy

vue-cli-template's People

Contributors

bxm0927 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.