黑马头条-2020版-前端部分-前端项目初始化.p001

前端环境搭建

视频推荐: https://www.bilibili.com/vide...

1. 使用Vue CLI脚手架创建项目

安装 VueCLI cmd下 : npm install --global @vue/cli-init(使用npm要安装了node.js)npm install --global @vue/cli 可以安装vue3.0

  1. 进入项目目录 例如:e:/project

    vue create toutiao-m 创建vue项目

  2. 选择Manually模式 空格选择(*)
    黑马头条-2020版-前端部分-前端项目初始化.p001_第1张图片

    babel : 把es6代码转es6兼容低版本

    router : 管理项目路由

    Vuex : 管理数据的共享数据状态

    CSS pre-processors css预处理器

    Linter 代码格式规范化

    Use history mode for router?(Requires proper server setup for index fallback in production)

    no

    Pick a CSS pre-processor(PostCSS,Autoprefixer and CSS Modules are supported by default):

    Less

    Pick a linter formatter config:

    ESLint Standard config

    Pick additional lint features:(Press to select,to toggle all,to invert selection)

    Lint on save

    Lint and fix on commit

    Where do you prefer placing config for Babel,ESLint,etc.(Use arrow keys)
    In dedicated config files

  3. 等待安装 cd toutiao-m,npm run serve
  4. 访问 localhost:8080

你可能感兴趣的:(黑马头条-2020版-前端部分-前端项目初始化.p001)