Includedinthisrepositoryarethefilesyouneedtoimportallthesnippetsfromtheamazingresource30-seconds-of-codeintoyoutexteditorofchoice(VSCode,Atom+Sublime).
Makesureyou⭐️theoriginalrepohere!
Thefilesinthisrepocontainthe30-seconds-of-codeSnippetsasofFebruary1st,2018'srelease.Theprojectisstillunderactivedevelopmentandnotallthesnippetscontainedhereinareproductionready.You'vebeenwarned.
HowtoimportthesnippetsVSCode:Goto'Preferences'>'Usersnippets'andselectthelanguage'Javascript',thenpasteinallthecodefromthejavascript.jsonfile.FormoreinformationcheckouttheVSCodesnippetsdocs.
Atom:Copythecodeinthesnippets.csonfileintoyourownsnippets.csonfilelocatedin~./atomdirectory.FormoreinformationcheckouttheAtomsnippetsdocs.
Sublime:Moveallthe*.sublime-snippet'sintoyourPackages/Userfolder(technicallyyoucanstore*.sublime-snippet'sinanypackage'sfolderbutforsimplicitiessakePackages/Userwillbeeasiesttofind).IfyourstuckmakesureyoucheckouttheSublimesnippetsdocs.
Alfred:Ifyou'reanAlfredpowerpackuseryourinluck,thereisaneasywaytoimportthesnippetsusingthefileinthisrepo.
NPM:Youcanofcourseaccessallofthesesnippetsandmorewiththe30-seconds-of-codenpmpackagebyrunningnpminstall30-seconds-of-codeorthetsocnpmpackagebyrunningnpminstalltsoc.
Afterthepackageisinstalledyoumayaccessasnippet(s)withthefollowingnotationfornode.js:import{snippetName,otherSnippet}from'_30s'and/orjavascript:const{snippetName,otherSnippet}=require('_30s')
SpecialthanksMadpropsgoouttothecoreteamandallthecontributorsat30-seconds-of-codewhohaveworkedhardputtingthesesnippetstogether.
评论