- Progressive Web Apps with React
- Scott Domes
- 185字
- 2021-07-08 09:36:15
Project initiation
The next thing we need to do is initiate our application as an npm project. Let's try it out, and then we'll discuss why we needed to do so:
- Inside your project folder, in your terminal, type yarn init and hit enter.
- It’ll ask you a series of questions. The first one is the most important--the name of our application. It should just take the name of the current folder (chatastrophe). If it doesn't, just enter chatastrophe. From there, just hit enter to skip the rest of the questions, accepting the default answers. These questions would matter more if we were planning on publishing our own package, but we're not, so no worries!
- If you take a look at your project folder after completing the yarn init, you'll notice that it added a package.json file with our project name and version. Our package.json is important, in that it will act as a list of our dependencies--the package we will install via yarn.
Enough talking about dependencies, though, let's install our first one! What better choice than to install React?
推薦閱讀
- 微信公眾平臺與小程序開發:從零搭建整套系統
- C語言程序設計基礎與實驗指導
- Scala Design Patterns
- Hands-On Data Structures and Algorithms with JavaScript
- 精通Python設計模式(第2版)
- Visual C#.NET程序設計
- Apache Spark 2.x for Java Developers
- Visual C++開發入行真功夫
- 區塊鏈技術進階與實戰(第2版)
- Learning JavaScript Data Structures and Algorithms(Second Edition)
- QlikView Unlocked
- Python一行流:像專家一樣寫代碼
- JavaWeb從入門到精通(視頻實戰版)
- 輕松學Scratch 3.0 少兒編程(全彩)
- Office VBA開發經典:中級進階卷