Git Product home page Git Product logo

projectdome's Introduction

说明

关键字:vue vuex node 前后端分离

基本使用流程

  1. 安装

npm install

  1. 提前打包静态资源文件

npm run dll

在项目中会有一些“静态”的外部资源,这些资源基本上不会变动。所以我们可以提前把这些资源打包成一个单独的.js文件。具体要打包的文件及打包设置在根目录的webpack.dll.conf.js中进行配置

var vendors = [
  'xlsx',
  'lodash',
  'vue/dist/vue.esm.js',
  'vue-router',
  'vuex',
  'element-ui',
  'echarts',
  'iview',
  'moment',
];

启动前端:

npm run dev

启动前端+启动node端

npm run dev-server

如果需要使用node中的模拟数据

第一步:npm run dev-server 第二步:修改api文件. sps-ui/src/api/saleTarget.js为例。在文件中中的alias对象中,添加键值对: queryAdjustVersion:http://localhost:8989/api/saleTarget/queryAdjustVersion

打包给测试环境使用

npm run build-test 具体的配置项在:config/prod-test.env.js中修改

打包给测试环境使用

npm run build 具体的配置项在:config/prod.env.js中修改


For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

projectdome's People

Contributors

fanyoufu avatar

Watchers

 avatar  avatar

Forkers

mabo0001

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.