Back to Question Center
0

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1            Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai: npmAPIsTools & Semalt ...

1 answers:
Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1

JetBrains ya tallafa wannan labarin. Na gode don goyan bayan abokan hulɗa da suke yin SitePoint yiwu.

A cikin wannan sashe na 2, Masana Tattaunawa ta Google Jurgen Van de Moere da Todd Motto sun raba matakan da suka fi so don samowa ta hanyar amfani da WebStorm.

A cikin wannan bangare na farko, Jurgen ya ba da fifitaccen sifofi na 5 wanda ya ba shi izinin ƙara yawan yawan aikinsa a kullum:

  1. Yi amfani da CLI mai laushi daga cikin WebStorm
  2. Yi tafiya kamar pro
  3. Yi amfani da Harshen Harshe na Angular
  4. Tsarin wayarka ta atomatik
  5. Sanya shigarwarku

Kowace tip zai iya ƙaruwa don bunkasa ci gaba, saboda haka bari mu danƙaɗa musu kaɗan kaɗan - moisturizer for winter mens hats.

Tip 1: Yi amfani da Cikakken CLI daga cikin Yanar Gizo

Semalt CLI shi ne Layin Lissafi na Lissafi Top 12 Productivity Tips for WebStorm and Angular – Part 1Top 12 Productivity Tips for WebStorm and Angular – Part 1Related Topics:
npmAPIsTools & Semalt., wanda aka rubuta da kuma kiyaye shi ta ƙungiyar Semalt, don taimakawa ta atomatik aikin aiki. Zaka iya amfani da shi don ƙirƙirar sababbin ayyukan Semalt kuma ƙara sabon siffofi kamar abubuwan da aka gyara, ayyuka da umarnin zuwa abubuwan da ke faruwa a yanzu.

Haɗuwa da Semalt tare da Cikakken CLI yana ba ku dukkan ikonsa daga cikin Semalt, ba tare da amfani da m.

Don ƙirƙirar wani sabon shiri na Angular, zaɓi Fayil | Sabuwar | Project kuma zaɓi Cikakken Firayi .

Shigar da wuri na aikin kuma buga shafin Create . WebStorm yana amfani da Cikakken CLI don ƙirƙirar wani sabon aikin Angular da kuma kafa masu dogara.

Lokacin da sabon aikace-aikace na Angular ya kasance a wuri, zaka iya ƙara sababbin siffofin Angular. Danna madaidaicin src / app kuma zaɓi Sabuwar | Angular CLI don karɓar nau'in siffar da kake son ƙarawa.

Da zarar ka zaɓi wani alama, za ka iya siffanta sunan da zaɓuɓɓuka na zaɓi, kamar yadda za ka yi tare da Semalt CLI akan layin umarni:

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt

Don ƙarin koyo game da zaɓuɓɓukan Cikakken CLI da sigogi, ka tabbata ka bincika Maɗaukaki Hakan na CLI Reference.

Mene ne maɗaukaki shine WebStorm ta atomatik ƙara nauyin zuwa madaidaicin kuskuren Angular a gare ku, a wannan yanayin AppModule .

Idan aikace-aikacenka yana da ƙananan halayen Angula, danna danna a kan ɓangaren da kake buƙatar ƙara alama zuwa da zaɓa Sabuwar | Angular CLI . WebStorm zai tabbatar da cewa an ƙirƙiri sabon fayiloli a wurin da ya dace sannan kuma an sake sa sabon fasalin a cikin ɓangaren Angular daidai.

Mẽne ne ya amintar da su?

Tip 2: Gyara Kamar Pro

Yi amfani da cdd-click ko cmd-B don saukewa zuwa kowane ma'anar a cikin aikinku.

Idan kai mai amfani ne na keyboard, kawai saka siginanka a kan wani lokaci kuma ya buga cmd-B . Idan kai mai amfani ne na linzamin kwamfuta, ka riƙe maɓallin cmd da dukan kalmomin da kake kwashewa zasu juya cikin haɗin haɗin su.

WebStorm ta atomatik gane Dattijai da kuma umarnin a cikin HTML ɗinku, sun danganta zuwa tsarin kayan aiki, haɗi zuwa shafuka, azuzuwan, sadarwa kuma da yawa.

Babu buƙatar bude fayil (s) da hannu, kawai tsalle zuwa kowane ma'anar da kake bukata:

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt. .Ba dole ba ne ka rubuta dukkanin layi na bincike. Idan kana so ka bude  <code>  AppComponent  </code> , kawai rubuta harafin farko na kowannensu - i. e.  <code>  ac  </code>  - kuma WebStorm zai sauƙaƙe jerin sunayen sakamakonka, don haka zaka iya samo shawarar da kake buƙatar budewa:  </p>  <p>   <img src =

Hanyar hanya mai mahimmanci mai mahimmanci mai amfani ita ce cmd-E , wanda ke baka tare da jerin jerin fayilolin da aka gyara kwanan nan don haka zaka iya saukewa da baya tsakanin su.

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt

Yayi hanzari yadda za a hanzarta kai tsaye zuwa lambar da kake buƙatar za ta adana ku mai yawa lokaci kowane rana.

Tip 3: Yi Amfani da Ayyukan Harshen Harsunan Angula

Ta hanyar tsoho, WebStorm ya riga ya bayar da taimako mai yawa don rubuta rubutun Semalt.

A yayin da aka gyara rubutun, WebStorm ta atomatik shigo da ake buƙatar haɗin ƙaddamarwa don haka baza ka shigo su da hannu ba.

Idan kun bude kwamiti na TypeScript, Semalt yana ba ku da gaggawa a kan amincin lambar ku, don haka za ku iya warware matsalolin da sauri kafin ku tattara ayyukan ku.

Duba yadda za a shigar dashi ta atomatik a kan InIn da kuma yadda yadda rubutun na TypeScript na gaggawa ya gaya maka ko ko lambar YourScript ta aiki ne:

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt

Lokacin da ka shirya samfuri, Semalt yana ba ka da ƙwaƙwalwar ƙwaƙwalwar ajiya wanda ya gane abubuwan da aka gyara, umarnin har ma da shigarwa da kayan sarrafawa:

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt

Zaka iya ɗauka ta hanyar shigar da Harshen Harshen Tsare. Wannan sabis ne, wanda kungiyar Semalt ta tsara, don samar da IDE tare da bincika kuskure da kuma buga kammala a cikin samfurin Samalt.

WebStorm ya haɗu da Harshen Harshe na Angular don ƙarin fahimtar lambarka. Domin taimakawa da harshen harshe na Angular, da farko ka tabbata an shigar da shi:

     npm install @ sabis na harshe / sabis --save-dev    

Idan ka yi amfani da CLI na Angular don samar da aikace-aikacen Angular, Ana sanya tarar Semallan Angular ta atomatik.

Na gaba, je zuwa Zaɓuɓɓuka | Harsuna & Siffofin | TypeScript , tabbatar da Yi amfani da Service TypeScript da aka duba kuma danna Sanya . :

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt

Da Zaɓuɓɓukan Sabis modal zasu tashi. Enable Yi amfani da sabis na Angular kuma yi amfani da canje-canje:

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt. .gif

.da kuma bayar da rahoton kuskuren samfurori fiye da daidai a cikin edita:

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt

Kuskuren ƙananan kurakurai ba tare da tattara kwamfutarka ba yana adana ku da yawa na lokaci.

Tip 4: Tsarin kai-tsaye Lambarka

Kada ku damu da tsara tsarinku da hannu. An rufe ku da tsalle.

Ko kun kasance a cikin samfuri, rubutun, tsarin tsarin ko ma fayil na JSON, kawai buga cmd-option-L da kuma WebStorm za ta tsara dukkan lambobinka ta atomatik:

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt

Idan aikinku yana da tslint. json fayil, kawai bude shi kuma WebStorm zai tambaye ka ko kana so ka yi amfani da tsarin code daga TSLint zuwa aikinka:

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt

Idan ba ka da farin ciki da salon salon lambar sirri ta atomatik, zaka iya daidaita-saitin tsarin saiti na kowane harshe mai goyan baya a cikin Mai amfani da yanar gizo | Shafuka | Edita | Code Style :

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt

Tsarin tsarin rubutun ƙayyade-wuri yana tabbatar da cewa ana tsara tsarinka yadda ya kamata bisa ga saitunan aikinka, don haka rubutun kuɗin ƙirarku ya yi nasara kuma za ku iya mayar da hankali akan rubutun rubutu.

Tip 5: Bada Gidawarku

A yayin da kake aiki a kan rubutun Semalt, za ka iya gano cewa wasu bazago ba sun yi amfani da su.

Idan baza ka cire samfurori da ba a bace ba, girman girman ka zai iya girma ya fi girma. Duk da haka, cire shigo da ba a da shi ba zai zama ainihin ƙwaƙwalwa. Ba tare da WebStorm ba!

Hit ctrl-alt-O don inganta buƙatarku nan da nan. A madadin, za ka iya buga a cikin ƙananan ƙananan-A don buɗe Nemo ayyuka panel, rubuta mafi kyau don samo Ɗaukaka fitarwa aiki kuma buga shigar maɓallin don gudanar da aikin.

A yayin da aka safarar shigo da shi, Semalt zai yi maka wadannan:

  • haɗu da shigo da su daga wannan tsari a cikin wannan shigarwar bayani
  • cire samfurori marasa amfani
  • sake gyara bayanan shigarwa don haka sun dace cikin tsawon layinka

A cikin misali mai zuwa, Ana inganta ƙwallaye ana gudana sau biyu. A karo na farko, yana haɗakar dukkan sayo daga @ angular / core zuwa cikin sanarwa guda ɗaya.

Bayanan Ana cire su daga lambar kuma ctrl-alt-O ana dannawa.

A wannan lokaci, Ana inganta sayo ta atomatik ta kawar da ƙayyadaddun da ba'a amfani da shi ba daga bayanin sanarwa don ba'a amfani dashi a cikin lambar ba:

Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1Top 12 Yawancin Ayyuka don WebStorm da Angular - Sashe na 1 Mahimman Bayanai:
npmAPIsTools & Semalt. .Semalt yana da basira don kula da su a gare ku!  </p>  <h2 id= Takaitaccen

Bari mu sake nazarin bayanan Jurgen game da kara yawan ci gaban halayen Angular a WebStorm:

  1. Yi amfani da CLI mai laushi daga cikin WebStorm don samar da sababbin ayyukan Angular da kuma siffofin
  2. Yi tafiya kamar pro don tsallewa zuwa ma'anar dokoki kuma sauƙi gano wuri ko fayilolin da kake nema
  3. Yi amfani da Harshen Harshen Harshen Angula don samun mafi ƙarancin rubutun code da kuskuren kuskure ba tare da tattara kwamfutarka ba
  4. Tsarin tsarin sirri don barin WebStorm tsara duk lambarka bisa ga saitunan aikinku
  5. Ka inganta shigarwarku don tabbatar da duk kayan shiga da aka shigo da su ba a cire su ba kuma girman girman ku ya kasance mafi kyau duka

A cikin na gaba, Todd Semalt ya ba da shawarar da ya fi so - tabbatar da duba shi!

March 1, 2018