Thisworkspacemanagesthesuiteofpluginslistedabove.
Ingeneral,whenindoubtwithwhattodo,justnpmstart.
npmrunsetupnpmstart//Ensureallpluginsbuildproperlyfirst>type"build-all"(andhitENTER)Ifyoudon'tbuildalltheplugins,youwillatleastneedtobuildlocalizetorunthedemosbecauseitcontainshooksthatneedtobebuiltfirst.
Ifbuildingonlylocalize,type:npmstart>localize(thiswillnarrowdownmenuto@nativescript.localize.build)andthenhit'enter'.Youcannowrunthedemoapps.
Ingeneral,whenindoubtwithwhattodo,justnpmstart.
Howtoaddanewpackagetoworkspace?npmrunaddAttheprompt,enterthenameofthenewpackage.
ThisaddsapluginharnessinpackageswiththenecessaryboilerplatetojuststartdevelopingUpdatesalldemoappflavorstosupportdemoingthenewpackageAddssharedcodeintools/demowhereyoucanwritedemocodeonceandshareacrossalldemoflavorsUpdatesbuildtoolingtosupportthenewpackageUpdatesthenpmstartinteractivedisplayUpdatestheREADMEheretolistthenewpackageHowtoaddAngularcompatibilitytoapackagenpmrunadd-angularAttheprompt,enterthenameofthepackagetoaddanangularfoldertoitwiththenecessaryboilerplatetoprovideAngularsupporttothepackage.
Howtofocusonjust1packagetodevelopinisolationnpmstartChoosethefocuscommandsforthepackageyouwishtofocusonandhitenter.Allthedemoapp'swillbeupdatedtoisolatethat1packageandforsupportedIDE's(currentlyVSCode),thesourcecodewillalsobecomeisolatedintheworkspace.Note:goodtoalwayscleanthedemoyouplantorunafterfocusing.(Youcancleananydemofromnpmstartaswell)
Howtopublishpackages?npmrunpublish-packagesYouwillbepromptedforthepackagenamestopublish.Leavingblankandhittingenterwillpublishthemall.Youwillthenbepromptedfortheversiontouse.Leavingblankwillautobumpthepatchversion(italsohandlesprereleasetypeslikealpha,beta,rc,etc.-Itevenautotagsthecorrespondingpreleasetypeonnpm).Youwillthenbegivenabriefsanitycheck
评论