zoukankan      html  css  js  c++  java
  • ubuntu16.04上vue环境搭建

    $ sudo apt-get install python-software-properties
    $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

    添加PPA文件后,让安装NodeJS。

    1. 安装nodejs相关环境

    sudo apt install nodejs

    2. 安装node包管理npm,及国内cnpm

    sudo apt install npm
    sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
    #升级 npm
    cnpm install npm -g
    
    # 升级或安装 cnpm
    npm install cnpm -g

    3. 利用cnpm 安装vue 和命令行工具 vue-cli

    cnpm install vue
    cnpm install --global vue-cli

    4. vue-cli 命令行工具使用

    # 全局安装 vue-cli
    $ cnpm install --global vue-cli
    # 创建一个基于 webpack 模板的新项目
    $ vue init webpack my-project
    # 这里需要进行一些配置,默认回车即可
    This will install Vue 2.x version of the template.

    5. 进入项目,安装并运行

    
    
    $ cd my-project
    $ cnpm install
    $ cnpm run dev
     DONE  Compiled successfully in 4388ms
    
    > Listening at http://localhost:8080
  • 相关阅读:
    HDU 1540 Tunnel Warfare (线段树区间合并)
    P2258 子矩阵
    P5021 赛道修建
    P4084 [USACO17DEC]Barn Painting
    P3914 染色计数
    比赛用模板
    P3594 [POI2015]WIL-Wilcze doły
    P5022 旅行
    P3952 时间复杂度
    P3960 列队
  • 原文地址:https://www.cnblogs.com/jkmiao/p/9534772.html
Copyright © 2011-2022 走看看