# vue study **Repository Path**: windgroup/vue-study ## Basic Information - **Project Name**: vue study - **Description**: vue study and test by vs code. - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-13 - **Last Updated**: 2022-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # javascript test #### 介绍 Use vs code run and debug java script. #### 环境 1. install software: vs code 2. install plug-in: * Debug for Chrome, * Browser Previews * Code Runner, * HTML CSS Support, * Live Server, #### 创建vs code工程: 1. 新建文件夹 vue_study 2. 打开vs code, 选择 "File"--"Open folder...",选择 vue_study文件夹 3. 创建 index.html 文件,里面加入vue.js的脚本引用。 4. 选择vs code左侧三角形(run and debug)图标, 选择"create a launch.json file.",并选择chrome作为调试平台。 5. 修改launch.json文件如下: ``` json { // 用live server服务器的好处是,每次保存html或者js文件,会自动刷新网页,不用服务器则要手动刷新网页。 "name": "use live server", // 本机通过(live server插件)建立一个简单服务器,服务器配置端口号为8080 "type": "chrome", "request": "launch", "url": "http://localhost:8080", "webRoot": "${workspaceRoot}", }, { // 用live server服务器的好处是,每次保存html或者js文件,会自动刷新网页,不用服务器则要手动刷新网页。 "name": "browser-preview launch", // 本机通过(live server插件)建立一个简单服务器,服务器配置端口号为8080 "type": "browser-preview", // 用browser-preview插件代替chrome "request": "launch", // launch or attach "url": "http://localhost:8080", "webRoot": "${workspaceRoot}", } ``` 6. 注意:用browser-preview插件调试的时候,不能弹框和显示提示信息。用chrome浏览器则没有问题。 ### git 的基本操作 1. 初始化: `git init` 2. 定向到你的仓库代码: `git remote add origin https://gitee.com/windgroup/javascript-test` 3. 上传并添加评论: `git add .` `git commit -m "add new."` `git push origin master` 4. 拉取最新代码 `git pull origin master`