Giter Club home page Giter Club logo

vue-cli-plugin-custom-tpl's Introduction

vue-cli-plugin-custom-tpl

Vue CLI 3.0 自定义模板插件

特性

脚手架默认开启如下功能:

  • less处理器
  • router
  • axios

安装

使用preset自动安装插件

vue create --preset natee/vue-cli-plugin-custom-tpl my-app

preset.json

{
  "useConfigFiles": true,
  "router": true,
  "cssPreprocessor": "less",
  "plugins": {
    "@vue/cli-plugin-babel": {},
    "@vue/cli-plugin-eslint": {
      "config": "prettier",
      "lintOn": [
        "save"
      ]
    },
    "vue-cli-plugin-custom-tpl": {
      "replaceTemplates": true,
      "router": true
    }
  }
}

手动安装插件

使用vue-cli 3.0 常规创建一个项目

vue create my-app
cd my-app
vue add custom-tpl

目录结构

src
├── App.vue
├── api
│   └── index.js
├── assets
├── components
│   └── HelloWorld.vue
├── main.js
├── router.js
├── store.js
└── views
    ├── Hello.vue

自主开发

  1. Fork本项目到username/vue-cli-plugin-name
  2. 修改模板内容,npm publish包
  3. 修改username/vue-cli-plugin-name中的preset.json内容
  4. vue create --preset username/vue-cli-plugin-name my-app

其它

Vue CLI 2.x 定制化模板 natee/webpack

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.