Giter Club home page Giter Club logo

vue-template's Introduction

What?

这是一个 Vue 项目,集成了 Vue + Vue Router + Vuex 三个套件,并且使用 webpack 4.x 进行编译。

webpack 中还包括了例如 babel, webpack-dev-server 等等常规功能。支持 less。

可以把这个项目当做初始模板启动新的 Vue 项目。

Why?

vue-cli 有创建初始 Vue 项目模板的功能,但它存在几个很大的问题:

  1. vue-cli 2.x 版本创建的项目依赖 webpack 3.x,以及所有的 webpack 的依赖项(例如 babel)都比较老,而 webpack 4.x 有了极大的性能提升和大量的配置简化,不应该停留在老版本中。

  2. vue-cli 3.x 与时俱进,依赖 webpack 4.x,配套的依赖项也都很新。但问题是它是一个封闭的状态,所有内容只能通过预设的配置项来更改,而不是代码的形式。比如我想从 webpack-dev-server 改用 webpack-dev-middleware,我就不知道从哪儿开始。

所以在目前这个尴尬的状态下,我需要一个项目当做模板来启动其他项目。

How?

目前内置了两条最基本的命令:

  • npm run dev - 启动开发服务器,端口 8000 (可以在配置中修改)

  • npm run build - 进行构建,把 js, css, html 生成到 /dist

vue-template's People

Contributors

easonyq 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.