GithubHelp home page GithubHelp logo

zhengsd51 / vue-boilerplate-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicejade/vue-boilerplate-template

0.0 2.0 0.0 2.19 MB

🍎 Efficient development of web SPA using Vue.js(2.*) + Webpack + Element-ui + Pwa + Vuex + Vuex-router + Vue-i18n + Dayjs + Lodash.

Home Page: https://nicelinks.site

License: MIT License

JavaScript 58.85% AppleScript 2.36% HTML 2.66% Vue 30.54% CSS 5.58%

vue-boilerplate-template's Introduction

Vue Boilerplate Template

  twitter
🍒(vue webpack vuex vue-router vue-i18n element-ui) out of the box
🍎 Nice Boilerplate Template for creating medium plus Vue.js(2.*) project


Goal and Philosophy

For how to build medium-sized (+) VUE projects, provide some reference based on past experience.

Prerequisites

Node.js (>=4.x, 8.x preferred), Npm version 4+(Yarn preferred), and Git.

Demo

Online Demo Page

Advantage

Usage

git clone https://github.com/nicejade/vue-boilerplate-template (your-project-name)
cd your-project-name
npm install (npm i / yarn)
npm start / npm run dev / yarn run dev

Go to http://localhost:8080/. If port 8080 is already in use on your machine, the program will specify the available port (incremental) for you, for example, 8081. Of course, you can temporarily replace the port using the following command:

PORT=8888 npm run dev

Additional supplement: You need to make sure that PORT is a command that can be executed on your machine .

More Command
npm run build

Equivalent execution node build.js, initiate a build project .

npm run build:dll

Equivalent execution webpack --config build/webpack.dll.conf.js, For more information see webpack.DllPlugin.

npm run jarvis / yarn run jarvis

run webpack-jarvis(A very intelligent browser based Webpack dashboard),In your browser open: localhost:1337 , you have it.

JARVIS for Webpack

npm run pretest

Using nodejs to build the local server: http://localhost:3000/ , do a simple pre test for the code after the package.

npm run analyz

Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap. It will automatically open this address:http://localhost:8888/ .

webpack-bundle-analyzer

Dependent plugin list

  • vue2
  • vue-router
  • vuex
  • vue-i18n
  • axios
  • bootstrap
  • element-ui
  • lodash
  • moment dayjs
  • js-cookie
  • vuex-persistedstate
  • ... ...

Operation request

Your backend can return the following format data, it's better .

{
  success: true,
  message: 'err message content',
  value: [
    // Useful data
  ]
}

At the front end, you can handle the request like this:

let params = {
  // Interface required parameters
}
this.isLoading = true
this.$apis.moduleName.getProfile(params).then(result => {
  // Handle the correct data you received
  this.$message({
    message: result,
    type: 'success'
  })
}).catch(error => {
  this.$message.error(`Error: ${error}`)
}).fin(() => {
  this.isLoading = false
})

So considerate, Template has been helped to handle the request uniformly, so you can be so easy to use, of course, you can change your own as needed in the helper/ajax.js file .

Links

Writing

See the example in the boilerplate template. Or An example that has been applied, Online address: https://nicelinks.site.

License

MIT

Copyright (c) 2017-present, NiceJade.

vue-boilerplate-template's People

Contributors

nicejade avatar ilovejade avatar jeffjade 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.