• vue项目的各个文件作用


    vue项目的各个文件作用:

    build:放置的是webpack配置文件,一般不动,修改了必须重启服务器才能生效

    config:放置针对开发环境和线上环境的配置文件,一般不动 修改后需重启

    node_modules:项目的依赖

    src:所有的源代码

    static:静态资源 //只有这个目录可以被外部访问到,如http://localhost:8080/static/mock/index.json 能访问到内容,
    //http://localhost:8080/src/main.js 这样不会访问到内容,只会跳回到http://localhost:8080/
    //static用于本地模拟数据

    .babelrc:babel编译

    .editorconfig:浏览器配置

    eslintignore:eslint的配置

    .eslintrc.js:

    .gitignore: //加上目录如代码: static/mock就表明这个目录下的文件不会被提交到线上的git仓库里,以及本地的仓库也不会提交

    .postcssrc.js:

    index.html:

    package-lock.json:

    package.json:

    README.md:

    src-->main.js 整个项目的入口文件

    因为webpack中配置了hot-reload,所以代码修改,浏览器自动刷新。

    组件的封装: .vue文件 包括组件的模板(template) 逻辑(script) 样式(style)

    main.js入口文件

    启动项目:在项目文件夹下运行命令 npm run start

  • 相关阅读:
    Debate
    图形算法
    OpenGL Notes
    How to Write an Ethics Paper
    Thesis
    addWindowListener -> WindowAdapter -> windowClosing
    Thesis
    Bootcamp: An error occurred while partitioning the disk
    What Is XML Schema
    What Is XML
  • 原文地址:https://www.cnblogs.com/jing-tian/p/11749989.html
Copyright © 2020-2023  润新知