- 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?
推薦閱讀
- 少兒人工智能趣味入門(mén):Scratch 3.0動(dòng)畫(huà)與游戲編程
- SQL Server 從入門(mén)到項(xiàng)目實(shí)踐(超值版)
- Boost程序庫(kù)完全開(kāi)發(fā)指南:深入C++”準(zhǔn)”標(biāo)準(zhǔn)庫(kù)(第5版)
- 垃圾回收的算法與實(shí)現(xiàn)
- Leap Motion Development Essentials
- NLTK基礎(chǔ)教程:用NLTK和Python庫(kù)構(gòu)建機(jī)器學(xué)習(xí)應(yīng)用
- Animate CC二維動(dòng)畫(huà)設(shè)計(jì)與制作(微課版)
- Drupal 8 Configuration Management
- Learning Unity 2D Game Development by Example
- 第一行代碼 C語(yǔ)言(視頻講解版)
- Nagios Core Administration Cookbook(Second Edition)
- Responsive Web Design with jQuery
- C Primer Plus(第6版)中文版【最新修訂版】
- 計(jì)算機(jī)視覺(jué)實(shí)戰(zhàn):基于TensorFlow 2
- OpenCV:Computer Vision Projects with Python