Files
go-task/ru-RU/assets/js/42e1775d.64f6e20f.js
2023-05-23 00:35:34 +00:00

1 line
8.0 KiB
JavaScript

"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[710],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return f}});var a=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,a,i=function(e,t){if(null==e)return{};var n,a,i={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=a.createContext({}),u=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(n),d=i,f=p["".concat(l,".").concat(d)]||p[d]||m[d]||o;return n?a.createElement(f,r(r({ref:t},c),{},{components:n})):a.createElement(f,r({ref:t},c))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,r=new Array(o);r[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:i,r[1]=s;for(var u=2;u<o;u++)r[u]=n[u];return a.createElement.apply(null,r)}return a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},7078:function(e,t,n){n.r(t),n.d(t,{assets:function(){return l},contentTitle:function(){return r},default:function(){return p},frontMatter:function(){return o},metadata:function(){return s},toc:function(){return u}});var a=n(3117),i=(n(7294),n(3905));const o={slug:"/integrations/",sidebar_position:5},r="Integrations",s={unversionedId:"integrations",id:"integrations",title:"Integrations",description:"Visual Studio Code Extension",source:"@site/i18n/ru-RU/docusaurus-plugin-content-docs/current/integrations.md",sourceDirName:".",slug:"/integrations/",permalink:"/ru-RU/integrations/",draft:!1,tags:[],version:"current",sidebarPosition:5,frontMatter:{slug:"/integrations/",sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a API",permalink:"/ru-RU/api/"},next:{title:"FAQ",permalink:"/ru-RU/faq/"}},l={},u=[{value:"Visual Studio Code Extension",id:"visual-studio-code-extension",level:2},{value:"Schema",id:"schema",level:2},{value:"Visual Studio Code",id:"visual-studio-code",level:3},{value:"Community Integrations",id:"community-integrations",level:2}],c={toc:u};function p(e){let{components:t,...n}=e;return(0,i.kt)("wrapper",(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"integrations"},"Integrations"),(0,i.kt)("h2",{id:"visual-studio-code-extension"},"Visual Studio Code Extension"),(0,i.kt)("p",null,"Task has an ",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=task.vscode-task"},"official extension for Visual Studio Code"),". The code for this project can be found ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-task/vscode-task"},"here"),". To use this extension, you must have Task v3.23.0+ installed on your system."),(0,i.kt)("p",null,"This extension provides the following features (and more):"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"View tasks in the sidebar."),(0,i.kt)("li",{parentName:"ul"},"Run tasks from the sidebar and command palette."),(0,i.kt)("li",{parentName:"ul"},"Go to definition from the sidebar and command palette."),(0,i.kt)("li",{parentName:"ul"},"Run last task command."),(0,i.kt)("li",{parentName:"ul"},"Multi-root workspace support."),(0,i.kt)("li",{parentName:"ul"},"Initialize a Taskfile in the current workspace.")),(0,i.kt)("p",null,"To get autocompletion and validation for your Taskfile, see the ",(0,i.kt)("a",{parentName:"p",href:"#schema"},"Schema")," section below."),(0,i.kt)("p",null,(0,i.kt)("img",{parentName:"p",src:"https://github.com/go-task/vscode-task/blob/main/res/preview.png?raw=true",alt:"Task for Visual Studio Code"})),(0,i.kt)("h2",{id:"schema"},"Schema"),(0,i.kt)("p",null,"This was initially created by ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/KROSF"},"@KROSF")," in ",(0,i.kt)("a",{parentName:"p",href:"https://gist.github.com/KROSF/c5435acf590acd632f71bb720f685895"},"this Gist")," and is now officially maintained in ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-task/task/blob/main/docs/static/schema.json"},"this file")," and made available at ",(0,i.kt)("a",{parentName:"p",href:"https://taskfile.dev/schema.json"},"https://taskfile.dev/schema.json"),". This schema can be used to validate Taskfiles and provide autocompletion in many code editors:"),(0,i.kt)("h3",{id:"visual-studio-code"},"Visual Studio Code"),(0,i.kt)("p",null,"To integrate the schema into VS Code, you need to install the ",(0,i.kt)("a",{parentName:"p",href:"https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml"},"YAML extension")," by Red Hat. Any ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile.yml")," in your project should automatically be detected and validation/autocompletion should work. If this doesn't work or you want to manually configure it for files with a different name, you can add the following to your ",(0,i.kt)("inlineCode",{parentName:"p"},"settings.json"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'// settings.json\n{\n "yaml.schemas": {\n "https://taskfile.dev/schema.json": [\n "**/Taskfile.yml",\n "./path/to/any/other/taskfile.yml"\n ]\n }\n}\n')),(0,i.kt)("p",null,"You can also configure the schema directly inside of a Taskfile by adding the following comment to the top of the file:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"# yaml-language-server: $schema=https://taskfile.dev/schema.json\nversion: '3'\n")),(0,i.kt)("p",null,"You can find more information on this in the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/redhat-developer/yaml-language-server"},"YAML language server project"),"."),(0,i.kt)("h2",{id:"community-integrations"},"Community Integrations"),(0,i.kt)("p",null,"In addition to our official integrations, there is an amazing community of developers who have created their own integrations for Task:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://packagecontrol.io/packages/Taskfile"},"Sublime Text Plugin")," [",(0,i.kt)("a",{parentName:"li",href:"https://github.com/biozz/sublime-taskfile"},"source"),"] by ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/biozz"},"@biozz")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://plugins.jetbrains.com/plugin/17058-taskfile"},"IntelliJ Plugin")," [",(0,i.kt)("a",{parentName:"li",href:"https://github.com/lechuckroh/task-intellij-plugin"},"source"),"] by ",(0,i.kt)("a",{parentName:"li",href:"https://github.com/lechuckroh"},"@lechuckroh")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://github.com/pycontribs/mk"},"mk")," command line tool recognizes Taskfiles natively.")),(0,i.kt)("p",null,"If you have made something that integrates with Task, please feel free to open a PR to add it to this list."))}p.isMDXComponent=!0}}]);