{"id":687,"date":"2022-05-04T02:53:00","date_gmt":"2022-05-04T00:53:00","guid":{"rendered":"https:\/\/blog.pirulug.com\/?p=687"},"modified":"2022-05-04T02:53:00","modified_gmt":"2022-05-04T00:53:00","slug":"publishing-extensions","status":"publish","type":"post","link":"https:\/\/blog.pirulug.com\/?p=687","title":{"rendered":"Publishing Extensions"},"content":{"rendered":"<h1 id=\"tu-primera-extensi\u00f3n\">Tu primera extensi\u00f3n<\/h1>\n<p>En este tema, le ense\u00f1aremos los conceptos fundamentales para crear extensiones. Aseg\u00farese de tener <a href=\"https:\/\/nodejs.org\/en\/\">Node.js<\/a> y <a href=\"https:\/\/git-scm.com\/\">Git<\/a> instalados, luego instale <a href=\"https:\/\/yeoman.io\/\">Yeoman<\/a> y <a href=\"https:\/\/www.npmjs.com\/package\/generator-code\">VS Code Extension Generator<\/a> con:<\/p>\n<pre class=\" language-bash\"><code class=\"prism  language-bash\">&lt;span class=&quot;token function&quot;&gt;npm&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;\/span&gt; -g yo generator-code\n<\/code><\/pre>\n<p>El generador construye un proyecto de TypeScript o JavaScript listo para el desarrollo. Ejecute el generador y complete algunos campos para un proyecto de TypeScript:<\/p>\n<pre class=\" language-bash\"><code class=\"prism  language-bash\">yo code\n\n&lt;span class=&quot;token comment&quot;&gt;# ? What type of extension do you want to create? New Extension (TypeScript)&lt;\/span&gt;\n&lt;span class=&quot;token comment&quot;&gt;# ? What&#039;s the name of your extension? HelloWorld&lt;\/span&gt;\n&lt;span class=&quot;token comment&quot;&gt;### Press &lt;Enter&gt; to choose default for all options below ###&lt;\/span&gt;\n\n&lt;span class=&quot;token comment&quot;&gt;# ? What&#039;s the identifier of your extension? helloworld&lt;\/span&gt;\n&lt;span class=&quot;token comment&quot;&gt;# ? What&#039;s the description of your extension? LEAVE BLANK&lt;\/span&gt;\n&lt;span class=&quot;token comment&quot;&gt;# ? Initialize a git repository? Yes&lt;\/span&gt;\n&lt;span class=&quot;token comment&quot;&gt;# ? Bundle the source code with webpack? No&lt;\/span&gt;\n&lt;span class=&quot;token comment&quot;&gt;# ? Which package manager to use? npm&lt;\/span&gt;\n\n&lt;span class=&quot;token comment&quot;&gt;# ? Do you want to open the new folder with Visual Studio Code? Open with `code`&lt;\/span&gt;\n<\/code><\/pre>\n<h1 id=\"vsce\">vsce<\/h1>\n<p>\n  <a href=\"https:\/\/github.com\/microsoft\/vsce\">vsce<\/a>, short for \u201cVisual Studio<br \/>\n  Code Extensions\u201d, is a command-line tool for packaging, publishing and<br \/>\n  managing VS Code extensions.\n<\/p>\n<h2 id=\"installation\">Installation<\/h2>\n<p>\n  Make sure you have <a href=\"https:\/\/nodejs.org\/\">Node.js<\/a> installed. Then<br \/>\n  run:\n<\/p>\n<pre><code>npm install -g vsce\n<\/code><\/pre>\n<h2 id=\"usage\">Usage<\/h2>\n<p>\n  You can use <code>vsce<\/code> to easily<br \/>\n  <a href=\"https:\/\/code.visualstudio.com\/api\/working-with-extensions\/publishing-extension#packaging-extensions\">package<\/a><br \/>\n  and<br \/>\n  <a href=\"https:\/\/code.visualstudio.com\/api\/working-with-extensions\/publishing-extension#publishing-extensions\">publish<\/a><br \/>\n  your extensions:\n<\/p>\n<pre class=\"language-bash\"><code class=\"prism  language-bash\">$ &lt;span class=&quot;token function&quot;&gt;cd&lt;\/span&gt; myExtension\n$ vsce package\n&lt;span class=&quot;token comment&quot;&gt;# myExtension.vsix generated&lt;\/span&gt;\n$ vsce publish\n&lt;span class=&quot;token comment&quot;&gt;# &lt;publisherID&gt;.myExtension published to VS Code Marketplace&lt;\/span&gt;\n<\/code><\/pre>\n<p>\n  <code>vsce<\/code> can also search, retrieve metadata, and unpublish<br \/>\n  extensions. For a reference on all the available <code>vsce<\/code> commands,<br \/>\n  run <code>vsce --help<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tu primera extensi\u00f3n En este tema, le ense\u00f1aremos los conceptos fundamentales para crear extensiones. Aseg\u00farese de tener Node.js y Git instalados, luego instale Yeoman y VS Code Extension Generator con: &lt;span class=&quot;token function&quot;&gt;npm&lt;\/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;\/span&gt; -g yo generator-code El generador construye un proyecto de TypeScript o JavaScript listo para el desarrollo. Ejecute el generador [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[142],"class_list":["post-687","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-visual-studio-code"],"_links":{"self":[{"href":"https:\/\/blog.pirulug.com\/index.php?rest_route=\/wp\/v2\/posts\/687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pirulug.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pirulug.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pirulug.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pirulug.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=687"}],"version-history":[{"count":0,"href":"https:\/\/blog.pirulug.com\/index.php?rest_route=\/wp\/v2\/posts\/687\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.pirulug.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pirulug.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pirulug.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}