C:\Users\fei>npm install -g vue-cli npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coff eescript" (no hyphen) D:\nodes\node_cache\vue-init -> D:\nodes\node_cache\node_modules\vue-cli\bin\vue -init D:\nodes\node_cache\vue -> D:\nodes\node_cache\node_modules\vue-cli\bin\vue D:\nodes\node_cache\vue-list -> D:\nodes\node_cache\node_modules\vue-cli\bin\vue -list + vue-cli@2.9.6 added 239 packages in 79.481s
C:\Users\fei>vue -V 2.9.6 C:\Users\fei>vue --help Usage: vue <command> [options] Options: -V, --version output the version number -h, --help output usage information Commands: init generate a new project from a template list list available official templates build prototype a new project create (for v3 warning only) help [cmd] display help for [cmd]
C:\Users\fei>vue list Available official templates: ★ browserify - A full-featured Browserify + vueify setup with hot-reload, li nting & unit testing. ★ browserify-simple - A simple Browserify + vueify setup for quick prototypi ng. ★ pwa - PWA template for vue-cli based on the webpack template ★ simple - The simplest possible Vue setup in a single HTML file ★ webpack - A full-featured Webpack + vue-loader setup with hot reload, lint ing, testing & css extraction. ★ webpack-simple - A simple Webpack + vue-loader setup for quick prototyping . # 切換到指定目錄 C:\Users\fei>cd E:\前端\vue\vue學習\第一個vue-cli項目 C:\Users\fei>e: E:\前端\vue\vue學習\第一個vue-cli項目>
E:\前端\vue\vue學習\第一個vue-cli項目>vue init webpack-simple myProject ? Project name 01 ? Project description A Vue.js project ? Author 張亞飛 <1271570224@qq.com> ? License MIT ? Use sass? No vue-cli · Generated "myProject". To get started: cd myProject npm install npm run dev
若是報錯css
> cross-env NODE_ENV=development webpack-dev-server --open --hot 'webpack-dev-server' 不是內部或外部命令,也不是可運行的程序 或批處理文件。 events.js:167 throw er; // Unhandled 'error' event ^
解決方案html
npm install webpack-cli@3.0.0 -g
vue開源項目彙總前端
https://github.com/opendigg/awesome-github-vue