vuejs目录结构启动项目安装nodejs命令,api配置信息思维导图版
vuejs目錄結構啟動項目安裝nodejs命令,api配置信息思維導圖版
vuejs技術交流QQ群:458915921 有興趣的可以加入?
vuejs
目錄結構
build
build.js
check-versions.js
utils.js
vue-loader.conf.js
webpack.base.conf.js
webpack.dev.conf.js
wepack.prod.conf.js
config
index.js
dev.env.js
pord.env.js
test.env.js
dist
static
index.html
src
assets
js
lang
img
components
*.vue
template
script
style
router
index.js
store
store.js
App.vue
etmb-header
router-view
etmb-footer
main.js
ElementUI
new Vue
static
img
favicon.ico
js
modify.js
theme
fonts
css
other
index.html
html
<body><div id="app"></div></body>
package.json
name
scripts
dependencies
devDependencies
engines
node: >= 6.0.0
npm: >= 3.0.0
browserslist
> 1%
last 2 versions
not ie <= 8
啟動項目
安裝nodejs
node下載地址https://nodejs.org/en/
查看nodejs版本和npm版本,在命令行中輸入:node -v,npm -v
安裝淘寶鏡像
https://npm.taobao.org/
安裝命令:npm install cnpm -g --registry=https://registry.npm.taobao.org
因為npm安裝插件是從國外服務器下載,受網絡影響大,可能出現異常,淘寶鏡像把npm的服務器放在了中國
cnpm與npm用法一直 ,使用時吧npm 前綴改為cnpm
使用淘寶鏡像安裝vue
安裝vue:cnpm install vue
安裝vue-cli:cnpm install --global vue-cli
創建項目:vue init webpack "projectName"
啟動項目
進入項目目錄,cd "projectPath"
執行命令:cnpm install && cnpm run dev
默認會打開:http://localhost:8080/
build命令:cnpm run build
api配置信息
config/index.js
target: 'http://api.xxx.net',
host: 'localhost',
port: 8080,
src/store/store.js
apis: 'http://api.xxx.net'
build/bulid.js
process.env.NODE_ENV = 'production'
?
總結
以上是生活随笔為你收集整理的vuejs目录结构启动项目安装nodejs命令,api配置信息思维导图版的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 泛圈科技:YottaChain区块链存储
- 下一篇: 中国信通院发布《云计算发展白皮书(202