美文网首页
Vue练手项目(二):新建项目(windows)

Vue练手项目(二):新建项目(windows)

作者: GordonFong | 来源:发表于2018-12-13 17:46 被阅读0次

    1.创建项目

    切换到工作目录下 , 安装完成后 , 将在当前目录生成一个admin_web的项目.

    $ vue init webpack admin_web
    ? Project name (admin_web)
    ? Project name admin_web
    ? Project description (A Vue.js project) 
    ? Project description the vue admin web  for supeeb project 
    hoolweb
    ? Author  PoorGuy1996
    ? Author PoorGuy1996
    ? Vue build (Use arrow keys)
    ? Vue build standalone
    ? Install vue-router? (Y/n) y
    ? Install vue-router? Yes
    ? Use ESLint to lint your code? (Y/n) n
    ? Use ESLint to lint your code? No
    ? Set up unit tests (Y/n)
    ? Set up unit tests Yes
    ? Pick a test runner (Use arrow keys)
    ? Pick a test runner jest
    ? Setup e2e tests with Nightwatch? (Y/n) n
    ? Setup e2e tests with Nightwatch? No
    

    安装成功后 , 查看项目结构:

    $ ls
    build/  config/  index.html  node_modules/  package.json  package-lock.json  README.md  src/  static/  test/
    

    2.运行项目

    切换到admin_web目录下 , npm install安装依赖 , npm run dev运行项目

    admin_web>npm install#安装依赖
    npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    up to date in 11.787s
    
    admin_web>npm run dev #运行项目
    > admin_web@1.0.0 dev E:\fry_work\PoorGuy\GitAli\super_school\admin_web
    > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
     95% emitting
     DONE  Compiled successfully in 2802ms                                                                                                                                                                                                                     17:38:03
     I  Your application is running here: http://localhost:8080
    

    3.运行效果

    在浏览器中打开http://localhost:8080 , 查看运行效果.

    运行效果

    相关文章

      网友评论

          本文标题:Vue练手项目(二):新建项目(windows)

          本文链接:https://www.haomeiwen.com/subject/lvpbhqtx.html