Description

The article for vue.js Setup.

Original post link:https://www.cnblogs.com/markjiang7m2/p/10783456.html

Source code:https://gitee.com/Sevenm2/Vue.Web/tree/master/Vue.Web

Development Environment Preparation

Node.js

If we want to develop Vue.js, we should install Node.js firstly.

Actually I have installed Node.js in my environment when I started my another repository TaxSystem, but without any note to mark down the action. I will write down the procedure here.

1.Install Node.js

Download Node.js install package from nodejs.org and install. You should select your version.

Set environment variables

And then you can input the command line to verify if Node.js is installed successfully.

node -v
npm -v

2.Environment Configuration

The node cache files and global modules will be installed and saved into C:\Users\xxx\AppData\Roaming\npm by default. We have better to change the path as our system disk space is limited.

Create 2 folders node_global & node_cache

Reset the configuration in CMD.

npm config set prefix "D:\Mark\nodejs\node_global"
npm config set cache "D:\Mark\nodejs\node_cache"

Add the environment variables

vue-cli

Install vue-cli as a global module.

npm install -g vue-cli

Input a command line to verify if vue-cli is installed successfully.

Setup a vue project

Use Visual Studio Code to open the folder you want to create the project in.

Click Ctrl + ~ to open the Terminal.

Input the below command line to new a project based on webpack and select the setting as requested.

vue init webpack projectname

Config the PORT No.

Enter the project folder and run the project

cd Vue.Web
npm run dev

Then we can view the Website in browser.

We can also build the project

npm run build .

vetur

It is an extension Vue tooling for VS Code.

1.Install vetur

Click Ctrl + P, input ext install vetur, then install the extension.

2.Add the below in User settings

Click Ctrl + Shift + P, input Preferences: Open User Settings.

Add the below in User settings

"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html"
}

Build Setup command line

# install dependencies
npm install # serve with hot reload at localhost:8080
npm run dev # build for production with minification
npm run build # build for production and view the bundle analyzer report
npm run build --report # run unit tests
npm run unit # run e2e tests
npm run e2e # run all tests
npm test

Vue Study [1]: Vue Setup的更多相关文章

  1. Vue Study [2]: Vue Router

    Description The article for vue router. Original post link:https://www.cnblogs.com/markjiang7m2/p/10 ...

  2. Vue学习之--------Vue中收集表单数据(使用v-model 实现双向数据绑定、代码实现)(2022/7/18)

    文章目录 1.Vue中实现表单数据的收集 1.1 基础知识 1.2 代码实例 1.3 测试效果 1.4 额外插一嘴 1.Vue中实现表单数据的收集 1.1 基础知识 表单中常用的标签:input(输入 ...

  3. Vue.js起手式+Vue小作品实战

    本文是小羊根据Vue.js文档进行解读的第一篇文章,主要内容涵盖Vue.js的基础部分的知识的,文章顺序基本按照官方文档的顺序,每个知识点现附上代码,然后根据代码给予个人的一些理解,最后还放上在线编辑 ...

  4. Vue 2.0 + Vue Router + Vuex

    用 Vue.js 2.x 与相配套的 Vue Router.Vuex 搭建了一个最基本的后台管理系统的骨架. 当然先要安装 node.js(包括了 npm).vue-cli 项目结构如图所示: ass ...

  5. 用TypeScript开发Vue——如何通过vue实例化对象访问实际ViewModel对象

    用TypeScript开发Vue--如何通过vue实例化对象访问实际ViewModel对象 背景 我个人很喜欢TypeScript也很喜欢Vue,但在两者共同使用的时候遇到一个问题. Vue的实例化对 ...

  6. vue学习之vue基本功能初探

    vue学习之vue基本功能初探: 采用简洁的模板语法将声明式的将数据渲染进 DOM: <div id="app"> {{ message }} </div> ...

  7. vue学习目录 vue初识 this指向问题 vue组件传值 过滤器 钩子函数 路由 全家桶 脚手架 vuecli element-ui axios bus

    vue学习目录 vue学习目录 Vue学习一之vue初识 Vue学习二之vue结合项目简单使用.this指向问题 Vue学习三之vue组件 Vue学习四之过滤器.钩子函数.路由.全家桶等 Vue学习之 ...

  8. 【Vue课堂】Vue.js 父子组件之间通信的十种方式

    这篇文章介绍了Vue.js 父子组件之间通信的十种方式,不管是初学者还是已经在用 Vue 的开发者都会有所收获.无可否认,现在无论大厂还是小厂都已经用上了 Vue.js 框架,简单易上手不说,教程详尽 ...

  9. Vue.js之Vue计算属性、侦听器、样式绑定

    前言 上一篇介绍了Vue的基本概念,这一篇介绍一下Vue的基本使用. 一.搭建一个Vue程序 1.1 搭建Vue环境 搭建Vue的开发环境总共有三种方法: 引入CDN <script src=& ...

随机推荐

  1. 我的Android进阶之旅------>Android实现音乐示波器、均衡器、重低音和音场功能

    本实例来自于<疯狂Android讲义>,要实现具体的功能,需要了解以下API: MediaPlayer  媒体播放器 Visualizer 频谱 Equalizer 均衡器 BassBoo ...

  2. 我的Android进阶之旅------>使用ThumbnailUtils类获取视频的缩略图

    今天看了一段代码,是关于获取视频的缩略图的,让我认识了一个ThumbnailUtils类,代码如下. Bitmap bitmap = ThumbnailUtils.createVideoThumbna ...

  3. PHP获取 当前页面名称、主机名、URL完整地址、URL参数、获取IP

    $URL['PHP_SELF'] = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : (isset($_SERVER['SCRIPT_NAME ...

  4. weblogic开启远程访问的jmx设置

    通过jmx远程访问weblogic获取监控jvm的数据,要在weblogic启动的时候设置一些配置,具体如下: 在weblogic的安装目录:{weblogic_home}/wlserver_10.3 ...

  5. yum 安装软件时出现 is this ok [y/d/n]

    y下载安装 d只下载不安装 n不安装

  6. Appium移动自动化配置-ios&安卓

    官网安装参考:https://www.npmjs.com/package/appium Appium安装 1.安装nodejs 2.安装appium iOS侧环境安装 1.安装xcode 2.安装Xc ...

  7. Spring Boot2.0之自定义参数

    自定义参数,把不同环境的配置放到配置文件中去. 不同环境,如何区分配置文件信息,自定义配置文件信息 比如在 application.properties定义个参数 name=toov5 Spring ...

  8. Cannot load JDBC driver class 'com.mysql.jdbc.Driver '

    最近在学JAVA, SSM, 照着网上的例子系统启动后总是报这个错(IDE :IEDA): HTTP Status 500 - Request processing failed; nested ex ...

  9. python_opencv库的学习

    一.以灰度图的形式加载彩色图像. https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_image_display/py_image_ ...

  10. action和servlet共存(转)

    转自:http://www.cnblogs.com/nayitian/archive/2013/03/04/2942537.html 问题 项目要求struts2和servlet能够共存,就是stru ...