mirror of
https://github.com/go-task/task.git
synced 2026-06-28 07:04:33 +00:00
1 line
21 KiB
JavaScript
1 line
21 KiB
JavaScript
"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[405],{3905:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return k}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function i(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=r.createContext({}),c=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},u=function(e){var n=c(e.components);return r.createElement(s.Provider,{value:n},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},p=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=c(t),p=a,k=d["".concat(s,".").concat(p)]||d[p]||m[p]||l;return t?r.createElement(k,o(o({ref:n},u),{},{components:t})):r.createElement(k,o({ref:n},u))}));function k(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,o=new Array(l);o[0]=p;var i={};for(var s in n)hasOwnProperty.call(n,s)&&(i[s]=n[s]);i.originalType=e,i[d]="string"==typeof e?e:a,o[1]=i;for(var c=2;c<l;c++)o[c]=t[c];return r.createElement.apply(null,o)}return r.createElement.apply(null,t)}p.displayName="MDXCreateElement"},3645:function(e,n,t){t.r(n),t.d(n,{assets:function(){return s},contentTitle:function(){return o},default:function(){return d},frontMatter:function(){return l},metadata:function(){return i},toc:function(){return c}});var r=t(3117),a=(t(7294),t(3905));const l={slug:"/styleguide/",sidebar_position:8},o="\u0421\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434",i={unversionedId:"styleguide",id:"styleguide",title:"\u0421\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434",description:"\u042d\u0442\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434 Task \u0434\u043b\u044f Taskfile.yml \u0444\u0430\u0439\u043b\u043e\u0432. \u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448 Taskfile \u0431\u044b\u043b \u0447\u0438\u0441\u0442\u044b\u043c \u0438 \u043f\u043e\u043d\u044f\u0442\u0435\u043d \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.",source:"@site/i18n/ru-RU/docusaurus-plugin-content-docs/current/styleguide.md",sourceDirName:".",slug:"/styleguide/",permalink:"/ru-RU/styleguide/",draft:!1,tags:[],version:"current",sidebarPosition:8,frontMatter:{slug:"/styleguide/",sidebar_position:8},sidebar:"tutorialSidebar",previous:{title:"FAQ",permalink:"/ru-RU/faq/"},next:{title:"Changelog",permalink:"/ru-RU/changelog/"}},s={},c=[{value:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>Taskfile.yml</code> \u0432\u043c\u0435\u0441\u0442\u043e <code>taskfile.yml</code>",id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-taskfileyml-\u0432\u043c\u0435\u0441\u0442\u043e-taskfileyml",level:2},{value:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432",id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439-\u043f\u043e\u0440\u044f\u0434\u043e\u043a-\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445-\u0441\u043b\u043e\u0432",level:2},{value:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 2 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u0434\u043b\u044f \u043e\u0442\u0441\u0442\u0443\u043f\u0430",id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-2-\u043f\u0440\u043e\u0431\u0435\u043b\u0430-\u0434\u043b\u044f-\u043e\u0442\u0441\u0442\u0443\u043f\u0430",level:2},{value:"\u0420\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438",id:"\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435-\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u0441\u0435\u043a\u0446\u0438\u0438-\u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438",level:2},{value:"\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438",id:"\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435-\u043f\u0440\u043e\u0431\u0435\u043b\u044b-\u043c\u0435\u0436\u0434\u0443-\u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438",level:2},{value:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435",id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-\u0438\u043c\u0435\u043d\u0430-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445-\u0432-\u0432\u0435\u0440\u0445\u043d\u0435\u043c-\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435",level:2},{value:"\u041d\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0445 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445",id:"\u043d\u0435-\u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u0432-\u043f\u0440\u043e\u0431\u0435\u043b\u044b-\u043f\u0440\u0438-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438-\u0438\u0445-\u0432-\u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445",level:2},{value:"\u0420\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u0441\u043b\u043e\u0432\u0430 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447 \u0434\u0435\u0444\u0438\u0441\u043e\u043c",id:"\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435-\u0441\u043b\u043e\u0432\u0430-\u0432-\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438-\u0437\u0430\u0434\u0430\u0447-\u0434\u0435\u0444\u0438\u0441\u043e\u043c",level:2},{value:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u0434\u043b\u044f \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u043e\u0432 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u0445 \u0437\u0430\u0434\u0430\u0447",id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-\u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435-\u0434\u043b\u044f-\u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u043e\u0432-\u0432-\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u0445-\u0437\u0430\u0434\u0430\u0447",level:2},{value:"Prefer external scripts over complex multi-line commands",id:"prefer-external-scripts-over-complex-multi-line-commands",level:2}],u={toc:c};function d(e){let{components:n,...t}=e;return(0,a.kt)("wrapper",(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"\u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434"},"\u0421\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434"),(0,a.kt)("p",null,"\u042d\u0442\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434 Task \u0434\u043b\u044f ",(0,a.kt)("inlineCode",{parentName:"p"},"Taskfile.yml")," \u0444\u0430\u0439\u043b\u043e\u0432. \u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448 Taskfile \u0431\u044b\u043b \u0447\u0438\u0441\u0442\u044b\u043c \u0438 \u043f\u043e\u043d\u044f\u0442\u0435\u043d \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c."),(0,a.kt)("p",null,"\u042d\u0442\u043e\u0442 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0431\u0449\u0438\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430, \u043d\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0438\u0445 \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c Issue \u0438\u043b\u0438 PR \u0441 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u044d\u0442\u043e\u0433\u043e \u0433\u0438\u0434\u0430."),(0,a.kt)("h2",{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-taskfileyml-\u0432\u043c\u0435\u0441\u0442\u043e-taskfileyml"},"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 ",(0,a.kt)("inlineCode",{parentName:"h2"},"Taskfile.yml")," \u0432\u043c\u0435\u0441\u0442\u043e ",(0,a.kt)("inlineCode",{parentName:"h2"},"taskfile.yml")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# bad\ntaskfile.yml\n\n\n# good\nTaskfile.yml\n")),(0,a.kt)("p",null,"\u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Linux. \u0423 Windows \u0438 macOS \u043d\u0435\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 ",(0,a.kt)("inlineCode",{parentName:"p"},"taskfile.yml")," \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0412 Linux \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c ",(0,a.kt)("inlineCode",{parentName:"p"},"Taskfile.yml"),"."),(0,a.kt)("h2",{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439-\u043f\u043e\u0440\u044f\u0434\u043e\u043a-\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445-\u0441\u043b\u043e\u0432"},"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"version:")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"includes:")),(0,a.kt)("li",{parentName:"ul"},"\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a ",(0,a.kt)("inlineCode",{parentName:"li"},"output:"),", ",(0,a.kt)("inlineCode",{parentName:"li"},"silent:"),", ",(0,a.kt)("inlineCode",{parentName:"li"},"method:")," \u0438 ",(0,a.kt)("inlineCode",{parentName:"li"},"run:")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"vars:")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"env:"),", ",(0,a.kt)("inlineCode",{parentName:"li"},"dotenv:")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"tasks:"))),(0,a.kt)("h2",{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-2-\u043f\u0440\u043e\u0431\u0435\u043b\u0430-\u0434\u043b\u044f-\u043e\u0442\u0441\u0442\u0443\u043f\u0430"},"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 2 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u0434\u043b\u044f \u043e\u0442\u0441\u0442\u0443\u043f\u0430"),(0,a.kt)("p",null,"\u042d\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f YAML-\u0444\u0430\u0439\u043b\u043e\u0432, \u0438 Task \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0435\u043c\u0443."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# bad\ntasks:\n foo:\n cmds:\n - echo 'foo'\n\n\n# good\ntasks:\n foo:\n cmds:\n - echo 'foo'\n")),(0,a.kt)("h2",{id:"\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435-\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435-\u0441\u0435\u043a\u0446\u0438\u0438-\u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438"},"\u0420\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# bad\nversion: '3'\nincludes:\n docker: ./docker/Taskfile.yml\noutput: prefixed\nvars:\n FOO: bar\nenv:\n BAR: baz\ntasks:\n # ...\n\n\n# good\nversion: '3'\n\nincludes:\n docker: ./docker/Taskfile.yml\n\noutput: prefixed\n\nvars:\n FOO: bar\n\nenv:\n BAR: baz\n\ntasks:\n # ...\n")),(0,a.kt)("h2",{id:"\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435-\u043f\u0440\u043e\u0431\u0435\u043b\u044b-\u043c\u0435\u0436\u0434\u0443-\u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438"},"\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# bad\nversion: '3'\n\ntasks:\n foo:\n cmds:\n - echo 'foo'\n bar:\n cmds:\n - echo 'bar'\n baz:\n cmds:\n - echo 'baz'\n\n\n# good\nversion: '3'\n\ntasks:\n foo:\n cmds:\n - echo 'foo'\n\n bar:\n cmds:\n - echo 'bar'\n\n baz:\n cmds:\n - echo 'baz'\n")),(0,a.kt)("h2",{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-\u0438\u043c\u0435\u043d\u0430-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445-\u0432-\u0432\u0435\u0440\u0445\u043d\u0435\u043c-\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435"},"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# bad\nversion: '3'\n\nvars:\n binary_name: myapp\n\ntasks:\n build:\n cmds:\n - go build -o {{.binary_name}} .\n\n\n# good\nversion: '3'\n\nvars:\n BINARY_NAME: myapp\n\ntasks:\n build:\n cmds:\n - go build -o {{.BINARY_NAME}} .\n")),(0,a.kt)("h2",{id:"\u043d\u0435-\u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435-\u0432-\u043f\u0440\u043e\u0431\u0435\u043b\u044b-\u043f\u0440\u0438-\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438-\u0438\u0445-\u0432-\u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445"},"\u041d\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0445 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# bad\nversion: '3'\n\ntasks:\n greet:\n cmds:\n - echo '{{ .MESSAGE }}'\n\n\n# good\nversion: '3'\n\ntasks:\n greet:\n cmds:\n - echo '{{.MESSAGE}}'\n")),(0,a.kt)("p",null,"\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043b\u044e\u0434\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432 Go."),(0,a.kt)("h2",{id:"\u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435-\u0441\u043b\u043e\u0432\u0430-\u0432-\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438-\u0437\u0430\u0434\u0430\u0447-\u0434\u0435\u0444\u0438\u0441\u043e\u043c"},"\u0420\u0430\u0437\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u0441\u043b\u043e\u0432\u0430 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447 \u0434\u0435\u0444\u0438\u0441\u043e\u043c"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# bad\nversion: '3'\n\ntasks:\n do_something_fancy:\n cmds:\n - echo 'Do something'\n\n\n# good\nversion: '3'\n\ntasks:\n do-something-fancy:\n cmds:\n - echo 'Do something'\n")),(0,a.kt)("h2",{id:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435-\u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435-\u0434\u043b\u044f-\u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u043e\u0432-\u0432-\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u0445-\u0437\u0430\u0434\u0430\u0447"},"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 \u0434\u043b\u044f \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u043e\u0432 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u0445 \u0437\u0430\u0434\u0430\u0447"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# good\nversion: '3'\n\ntasks:\n docker:build:\n cmds:\n - docker ...\n\n docker:run:\n cmds:\n - docker-compose ...\n")),(0,a.kt)("p",null,"\u042d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 Taskfiles."),(0,a.kt)("h2",{id:"prefer-external-scripts-over-complex-multi-line-commands"},"Prefer external scripts over complex multi-line commands"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# bad\nversion: '3'\n\ntasks:\n build:\n cmds:\n - |\n for i in $(seq 1 10); do\n echo $i\n echo \"some other complex logic\"\n done'\n\n# good\nversion: '3'\n\ntasks:\n build:\n cmds:\n - ./scripts/my_complex_script.sh\n")))}d.isMDXComponent=!0}}]); |