美文网首页create-react-app
03. folder-structure.md【create-r

03. folder-structure.md【create-r

作者: 幸运女神微笑 | 来源:发表于2019-04-23 14:08 被阅读0次

id: folder-structure
title: Folder Structure


After creation, your project should look like this:

应用创建后,项目结构类似:

my-app/
  README.md
  node_modules/
  package.json
  public/
    index.html
    favicon.ico
  src/
    App.css
    App.js
    App.test.js
    index.css
    index.js
    logo.svg

For the project to build, these files must exist with exact filenames:

项目中一些文件是必须的,并且文件名也不可以更改

  • public/index.html is the page template;
  • public/index.html 是页面的HTML模板;
  • src/index.js is the JavaScript entry point.
  • src/index.js 是应用的入口。

You can delete or rename the other files.

其他的文件都是可以删除或重命名的。

You may create subdirectories inside src. For faster rebuilds, only files inside src are processed by Webpack. You need to put any JS and CSS files inside src, otherwise Webpack won’t see them.

可以在 src 下创建子目录;为了加快应用构建、打包速度,Webpack只会处理 src 目录下的文件;任何需要被处理的文件 都必须要放在 src 目录下

Only files inside public can be used from public/index.html. Read instructions below for using assets from JavaScript and HTML.

只有 public 目录下的文件会被使用在 public/index.html 中。 起其他的如 JavaScript 和 HTML 请参考之后的说明。

You can, however, create more top-level directories. They will not be included in the production build so you can use them for things like documentation.

当然,可以在项目的根目录创建其他的文件夹,这些文件夹都不会被打包到生产环境中,因此可以用于项目文档等用途。

If you have Git installed and your project is not part of a larger repository, then a new repository will be initialized resulting in an additional top-level .git directory.

如果是使用 Git 做项目的版本控制,项目根目录还会包含 .git 顶级目录。

相关文章

  • 03. folder-structure.md【create-r

    id: folder-structuretitle: Folder Structure After creatio...

  • 03.

    是啊,我也多想这个是您。

  • 〖03.〗

    好在很快到了云墨中学校门口,我和顾芪白一同走进高二报名大厅内。 “怎么都这个点了还这么多人啊…”我皱着眉望着里三圈...

  • 『03.』

    晚上七点半,鹿晗和温桉桉到了机场。 鹿晗一路上都在啰嗦,让温桉桉好好照顾自己。 “我又不是刚生下来的婴儿,难道还不...

  • 随手抓住一束风,便是一整个夏天

    SUMMER IS VERY HOT 夏天是什么? 01.是龙虾 02.是西瓜 03.是冰饮料 03.是我们

  • 夏.纯洁的你

    01. 02. 03.

  • 徐志摩:好久不见!

    01. 03. 05.

  • 帘卷西风之穿越民女要逆天(二)

    文|亦柠北 03. 世界太...

  • 03.阴影

    加强真实感的方法 (1)阴影的作用: 带来现实感,也能勾勒出物体的轮廓,还能塑造戏剧性和悬疑的效果 有两种形式的阴...

  • 03.字典

    1. 简介 : 字典: 称符号表,关联数组,映射,是一种保存键值对的抽象数据结构。在字典中每个 key 是唯一的。...

网友评论

    本文标题:03. folder-structure.md【create-r

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