zoukankan      html  css  js  c++  java
  • springboot+VUE(一)

     https://segmentfault.com/blog/wangjihong

    安装nodejs与NPM

    下载nodejs的LTL版本,并安装

    https://nodejs.org/en/

    执行node -v检查版本

    npm在安装nodejs的时候会自动安装,使用以下命令更新npm到最新版本

    npm -g install npm
    npm -v

     安装淘宝npm

    npm install cnpm -g --registry=https://registry.npm.taobao.org

    安装vue-cli手脚架

    cnpm install -g vue-cli

    cmd进入你想创建工程的目录,指定工程目录,就可以开始创建工程了

    vue init webpack project-dir
    • Project name (project-dir)  如果不改就默认使用目录名,当作工程名,工程名允许出现大写字母 
    • Project description (A Vue.js project)  工程描述
    • Author (maobuji <16770864@qq.com>) 工程作者
    • Vue build (Use arrow keys): 有两个选项,推荐第一个

             Runtime + Compiler: recommended for most users  运行加编译

             Runtime-only: about 6KB lighter min+gzip, but templates (or any Vue-specific HTML) are ONLY allowed in .vue files - render functions are required elsewhere

    • Install vue-router? (Y/n)   安装vue-router
    • Use ESLint to lint your code? (Y/n)  

              Standard (https://github.com/standard/standard)

              Airbnb (https://github.com/airbnb/javascript)

              none (configure it yourself)

    • Set up unit tests (Y/n)

              Jest

              Karma and Mocha

              none (configure it yourself)

    • Setup e2e tests with Nightwatch? (Y/n)

            Should we run `npm install` for you after the project has been created? (recommended) (Use arrow keys)

               Yes, use NPM

               Yes, use Yarn

               No, I will handle that myself

    基本上一路回车下来,就可以了。

    编译运行项目

    cnpm install
    
    npm run dev

    如果install不成功,可以尝试运行  cnpm rebuild node-sass

    执行run dev以后系统就会启动了,config/index.js文件中,提供了启动端口。默认是8080

    访问http://localhost:8080 就可以看到欢迎页面了。

  • 相关阅读:
    英雄
    Sublime text 2/3 中 Package Control 的安装与使用方法
    python安装
    flex与C# Socket通信
    ActionScript接收socket服务器发送来的数据
    什么是Socket,为什么要用Socket
    Response.End(); 用HttpContext.Current.ApplicationInstance.CompleteRequest 代替
    探索C#之6.0语法糖剖析
    行为树(Behavior Tree)实践(1)– 基本概念
    浅谈层次化的AI架构
  • 原文地址:https://www.cnblogs.com/maobuji/p/10124789.html
Copyright © 2011-2022 走看看