56.java项目-activiti实战项目(2)-前端Vue-npm/vsCode的使用

npm

一.Vue框架引入的两种方式

1.网上下载vue.js文件,在将vue.js文件拷贝到项目中,这是传统的方式
2.Npm的方式.

二.Npm

1.Npm是什么?
npm是前端js框架中的maven,他用来远程下载js类库,和maven’的作用很像.
maven的依赖文件是pom文件,npm的文件是package.json,用来描述当前项目的.
2.npm的安装
(1)下载node.js,node.js中自带了npm.
(2)Cmd中验证是否安装了node.js 和 npm

C:\Users\13570>node -v
v12.16.1

C:\Users\13570>npm -v
6.13.4

C:\Users\13570>

3.npm初始化项目
(1)新建一个文件夹,在文件夹中进入cmd,输入 npm -init

D:\node.js\project\study\npm-demo3>npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (npm-demo3)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author: gl
license: (ISC)
About to write to D:\node.js\project\study\npm-demo3\package.json:

{
  "name": "npm-demo3", //这是项目名称
  "version": "1.0.0", //版本号
  "description": "", //描述
  "main": "index.js", //入口文件
  "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "gl", //作者
  "license": "ISC" //证书
}


Is this OK? (yes) y

D:\node.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值