All Projects → scopewu → vue-vuex-starter-kit

scopewu / vue-vuex-starter-kit

Licence: MIT License
Get started with Axios, Vue2, Vuex2, and Vue-router2. Build app with webpack.

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to vue-vuex-starter-kit

vue-element-admin-ts
vue-element-admin 的 typescript 版本
Stars: ✭ 101 (+494.12%)
Mutual labels:  axios, vue-router
Fee-blog
免费搭建自己的博客,看心情更新
Stars: ✭ 19 (+11.76%)
Mutual labels:  axios, vue-router
music
🎵vue 像素级还原mac客户端网易云音乐
Stars: ✭ 34 (+100%)
Mutual labels:  axios, vue-router
onsenui-vue-router-pwa
Onsen UI + Vue + Vue Router + Axios PWA Starter Project
Stars: ✭ 36 (+111.76%)
Mutual labels:  axios, vue-router
cloudMusic
(移动端)Vue2.0+Nodejs网易云音乐,网易云音乐api强力驱动,高音质破解(持续更新中)
Stars: ✭ 14 (-17.65%)
Mutual labels:  axios, vue-router
vue-element-admin
Vuejs实例-Vuejs2.0全家桶结合ELementUI制作后台管理系统http://www.cnblogs.com/weiqinl/p/6873761.html
Stars: ✭ 97 (+470.59%)
Mutual labels:  axios, vue-router
login push
vue+koa2+jwt实现单点登录 + todolist增删改查
Stars: ✭ 20 (+17.65%)
Mutual labels:  axios, vue-router
element-ui-demo
A element-ui admin base on vue2
Stars: ✭ 18 (+5.88%)
Mutual labels:  axios, vue-router
jooger.me
👍 My personal website,powered by @nuxt
Stars: ✭ 39 (+129.41%)
Mutual labels:  axios, vue-router
Eldin-Space-Vue
Personal Web Portfolio
Stars: ✭ 54 (+217.65%)
Mutual labels:  axios, vue-router
bilibili-vue
vue实战bilibili仿站:vue + vue router + vuex + axios
Stars: ✭ 78 (+358.82%)
Mutual labels:  axios, vue-router
vue-ssr-starter
Starter kit for projects with Webpack 4, Vue 2 and SSR
Stars: ✭ 53 (+211.76%)
Mutual labels:  axios, vue-router
admin-antd-vue
Vue3.x + Ant Design Admin template (vite/webpack)
Stars: ✭ 111 (+552.94%)
Mutual labels:  axios, vue-router
vue-iview-admin-template
Vue 2.0 admin template based on View UI
Stars: ✭ 43 (+152.94%)
Mutual labels:  axios, vue-router
vue-template
🎉 一个集成了 webpack + vue-loader + vuex + axios 的自定义 vue-cli 模板,其中包含 webpack 热更新,linting,测试以及 css 处理器等内容
Stars: ✭ 25 (+47.06%)
Mutual labels:  axios, vue-router
Code-VueWapDemo
“Vue教程--Wap端项目搭建从0到1”的源码
Stars: ✭ 19 (+11.76%)
Mutual labels:  axios, vue-router
vue-music
using Vue to Develop Mobile Project to Simulate “Baidu Music”(高仿百度音乐)
Stars: ✭ 27 (+58.82%)
Mutual labels:  axios, vue-router
vite-vue3-starter
⭐ A Vite 2.x + Vue 3.x + TypeScript template starter
Stars: ✭ 384 (+2158.82%)
Mutual labels:  axios, vue-router
vue-douban
高仿豆瓣app
Stars: ✭ 22 (+29.41%)
Mutual labels:  axios, vue-router
vuetify-admin
一个vuetify后台基础模板
Stars: ✭ 46 (+170.59%)
Mutual labels:  axios, vue-router

vue-vuex-starter-kit

Get started with Vue, Vuex, and Vue-router. Build app with webpack.

Quick start

Make sure you have Node version >= 6.0 and NPM >= 3

# Clone project code 
git clone https://github.com/scopewu/vue-vuex-starter-kit.git

# goto dir
cd vue-vuex-starter-kit

# install with npm or yarn
npm install # yarn install

# start the develop server, use Hot Module Replace
npm start # yarn start

open page in your browser with http://localhost:3000 or http://127.0.0.1:3000

of course you can change the port

# like use port 8080
# linux/os x
export PORT=8080 && npm start

#windows
set PORT=8080

Css preprocessing

If you are using less/stylus/styl, you can add them to the project.

in config/utils.js

function cssLoaders({sourceMap = false, extract = true}) {
  //code...

  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
  // TODO: Maybe you use less/stylus/styl, you should install the module with npm
  return {
    css: generateLoaders(),
    postcss: generateLoaders(),
    less: generateLoaders('less'),
    sass: generateLoaders('sass'),
    scss: generateLoaders('sass'),
    stylus: generateLoaders('stylus'),
    styl: generateLoaders('stylus')
  }
}

In the project root directory implementation npm install, install you need to use css tools. e.g.

npm install --save-dev less-loader

File Structure

We use component development in the project. Component development is an efficient development model and a good way to ensure maintainable code by encapsulating our behavioral logic.

.
├── config                   # Project and build configurations
├── public                   # Static public
├── server                   # Express server, build compile
├───├─bin                    # Build or Start server scripts
│   │  ├─ compile.js         # Compile static assets script
│   │  └─ www                # Start server
│   └── app.js               # Server application entry point
├── src                      # Application source code
│   ├── index.html           # Main HTML page container for app
│   ├── main.js              # Application bootstrap and rendering
│   ├── components           # Global Reusable Presentational Components
│   ├── layouts              # Components that dictate major page structure
│   │   └── MainLayout.vue   # main layout component for app
│   │   └── MainLayout.scss  # Styles of MainLayout component
│   │   └── index.js         # Main file for layout
│   ├── router               # VueRouter create
│   │   ├── index.js         # VueRouter Object script
│   │   ├── Home             # Fractal route
│   │   │   └── Home.vue     # Home Page component
│   │   └─── mores...
│   ├── store                # Vuex store
│   └── styles               # styles of app
└── mores...

Build System

We are using webpack to develop vue applications. The webpack config is placed in the config folder, which also contains the application configuration.

Globals

In the development environment, we can use the webpack's DefinePlugin plugin to set global variables

Variable Description
process.env.NODE_ENV the active NODE_ENV when the build started
__DEV__ True when process.env.NODE_ENV is development
__PROD__ True when process.env.NODE_ENV is production
__TEST__ True when process.env.NODE_ENV is test

build files

# development
npm run deploy:dev # or yarn run deploy
# production
npm run deploy:prod # or yarn run deploy:prod

Check server

If you have generated a static file for the project, we can run a suggested server to check if the app is running well.

# development
npm run server # or yarn run server
# production
npm run server:prod # or yarn run server:prod

Features

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].