vsCode工具作react開發,幾個經常使用插件

1、環境準備:
一、下載安裝VSCode,Node.js,Yarn
二、打開命令行終端或powershell,輸入yarn global add create-react-app安裝react的腳手架create-react-app
三、打開VSCode,安裝相應插件
必要:ESLint、DocumentThis、EasyLess、Complete JSDoc Tags、vscode-flow-ide、React native Tools、vscode-wechat、npm、babel-javascript、debugger for chrome、git lens、node debug 二、
可選:javascript (ES6) code snippets、reactjs code snippets、react-native/react/redux snippets for es6/es七、highlight bad chars、color highlight、Path Intellisense、partial diffjavascript

2、新建demo
一、VSCode編輯器中使用快捷鍵ctrl+`打開終端
二、在終端輸入create-react-app demo,自動建立名稱爲demo的項目
三、cd demo進入demo項目中
四、yarn start或yarn build運行項目java

3、react項目中使用echarts
一、終端輸入命令yarn add echarts 引入echarts
二、在須要使用echarts的js文件中,引入echarts模塊,具體有哪些能夠按需引入的模塊列表可查看demo->node_modules->echarts->index.js文件node

// 引入 ECharts 主模塊
import echarts from 'echarts/lib/echarts';
import 'echarts/lib/chart/line';
// 引入柱狀圖
import 'echarts/lib/chart/bar';
// 引入提示框和標題組件
import 'echarts/lib/component/tooltip';
import 'echarts/lib/component/title';

4、快捷鍵
終端使用ctrl+c退出批處理操做

react

一、vscode-fileheader 
添加文件頭 
二、reactjs code snippets 
react 開發的一些簡寫,提升開發效率 
三、Path Autocomplete 
路徑提示功能 
四、git blame 
安裝git後, git blame能夠基於git去審查每一行的代碼最近一次修改的做者git

相關文章
相關標籤/搜索