Vue目錄結構

最近公司項目用到Vue,所以學下Vue

轉載請註明出處
我的博客 http://www.lostbug.cn

目錄結構

|-- README.md       //項目說明文檔
|-- build/          //最終發佈代碼存放位置
|-- config/         //webpack配置目錄 包括端口號等
|-- index.html      //首頁入口文件
|-- node_modules/   //npm加載的項目依賴模塊
|-- package.json    //項目配置文件
|-- src/            //
|-- static/         //靜態資源目錄  圖片 字體等
`-- test/           //測試目錄

build

|-- build.js                   //生產環境結構代碼
|-- check-versions.js          //版本檢查
|-- dev-client.js              //熱加載相關代碼
|-- dev-server.js              //本地服務器
|-- utils.js                   //構建工具
|-- vue-loader.conf.js         //vue-loader配置文件
|-- webpack.base.conf.js       //webpack 基本配置文件
|-- webpack.dev.conf.js        //webpack dev配置文件
|-- webpack.prod.conf.js       //webpack 生產環境配置
`-- webpack.test.conf.js       //webpack 測試環境配置

config

|-- dev.env.js   //開發環境配置
|-- index.js     //項目配置
|-- prod.env.js  //生產環境配置
`-- test.env.js  //測試環境配置

node_modules

一些第三方的東東,不看了

src

|-- App.vue             //入口文件
|-- assets              //靜態文件
|   `-- logo.png
|-- components          //組件
|   `-- Hello.vue       
|-- main.js             //程序入口文件,引用、加載各種組件
|-- myApp.js            //本人寫的js
`-- router              //路由文件
    `-- index.js

test

|-- e2e                         //e2e tests
|   |-- custom-assertions       //custom assertions for e2e tests
|   |   `-- elementCount.js     
|   |-- nightwatch.conf.js      //test runner config file
|   |-- runner.js               //test runner script
|   `-- specs                   //test spec files
|       `-- test.js
`-- unit                        //unit tests
    |-- index.js                //test build entry file
    |-- karma.conf.js           //test runner config file
    `-- specs                   //test spec files
        `-- Hello.spec.js
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章