官术网_书友最值得收藏!

Creating the project structure

It's time to create our project structure. Organizing source files may sound like a simple task, but a well-thought-out project structure organization helps us understand the underlying architecture of our application. You'll see an example of this later in this book, when we'll talk about the Flux application architecture. Let's start by creating our root project directory named snapterest inside your home directory ~/snapterest/.

Then, inside it, we will create two other directories:

  • ~/snapterest/source/: Here we'll store our source JavaScript files
  • ~/snapterest/build/: Here we'll put compiled JavaScript files and an HTML file.

Now, inside ~/snapterest/source/, create the components/ folder so that your project structure would look like this:

  • ~/snapterest/source/components/
  • ~/snapterest/build/

Now, when we have our fundamental project structure ready, let's start populating it with our application files. First, we need to create our main application file app.js in the ~/snapterest/source/ directory. This file will be the entry point to our application, ~/snapterest/source/app.js.

Leave it empty for now, as we have a more pressing matter to discuss.

主站蜘蛛池模板: 渝中区| 萨嘎县| 青铜峡市| 呼玛县| 武城县| 思茅市| 武宁县| 石屏县| 新田县| 新乡市| 民县| 梨树县| 隆回县| 崇文区| 红安县| 霍城县| 清新县| 荃湾区| 西宁市| 玉溪市| 遵义市| 鲜城| 兴城市| 水城县| 东方市| 平泉县| 泌阳县| 尖扎县| 丰顺县| 彩票| 普格县| 河北省| 扎赉特旗| 永城市| 玉门市| 射洪县| 禹城市| 涞源县| 乐清市| 越西县| 绵阳市|