[Srijan Wednesday Webinars] Faster and Smarter Development with Drupal Console

  • Published on
    19-Jan-2017

  • View
    656

  • Download
    0

Embed Size (px)

Transcript

<ul><li><p>FasterandSmarterDevelopmentwithDrupal</p><p>Console</p></li><li><p>JesusManuelOlivas</p><p>Drupal8SolutionsEngineer|</p><p>IworkforFFW(andyoushouldtoo)</p><p>Aboutme</p><p>@jmolivas @drupalconsole@drupodcast</p><p>http://twitter.com/jmolivashttp://twitter.com/drupalconsolehttp://twitter.com/drupodcast</p></li><li><p>WhatistheDrupalConsole?</p><p>Itisasuiteoftoolsthatyourunonacommandlineinterface(CLI)togenerate</p><p>boilerplatecodeandinteractwithaDrupal8installation.</p></li><li><p>DavidFlores|@dmouse</p><p>EduardoGarca|@enzolutions</p><p>JessManuelOlivas|@jmolivas</p><p>OmarAguirre|@omers</p><p>Whomaintainthisproject?</p></li><li><p>Supportingorganizations</p><p>http://www.ffw.co/http://www.indava.com/http://www.anexusit.com/</p></li><li><p>Whyshouldyoucareaboutit?</p></li><li><p>Drupalismoretehcnicallyadvanced</p></li><li><p>HowdoesDrupalConsolehelp?</p></li><li><p>Generatingthecodeand lesrequiredbyaDrupal8module.</p><p>InteractingwithyourDrupalinstallation.</p><p>LearningDrupal8.</p></li><li><p>WheredoI ndtheproject?</p></li><li><p>LandingPage</p><p>Documentation</p><p>Support</p><p>http://drupalconsole.com/</p><p>http://bit.ly/console-book</p><p>http://bit.ly/console-support</p><p>http://drupalconsole.com/http://bit.ly/console-bookhttp://bit.ly/console-support</p></li><li><p>DownloadDrupalConsole</p></li><li><p>UsingtheInstaller</p><p>InstalltheConsolelocallybyrunningtheinstallerinyourprojectdirectory:</p><p>$ curl http://drupalconsole.com/installer | php</p><p>$ mv console.phar /usr/local/bin/drupal</p><p>$ drupal</p></li><li><p>UsingComposer</p><p>$ composer global require drupal/console:@stable</p><p># download at: # ~/.composer/vendor/drupal/console </p><p># run it using:$ ~/.composer/vendor/bin/console</p><p>Gitbook-UsingComposer</p><p>http://hechoendrupal.gitbooks.io/drupal-console/content/using/composer.html</p></li><li><p>UsingDrupalComposer</p><p>$ composer create-project drupal-composer/drupal-project:8.x-dev drupal8.dev --stability dev --no-interaction</p><p>https://github.com/drupal-composer/drupal-project</p><p>https://github.com/drupal-composer/drupal-project</p></li><li><p>UsingaVirtualMachine</p><p>DrupalVM</p><p>AVMforlocalDrupaldevelopment</p><p>Drupal8SprintBox</p><p>SimpleDrupal8DevelopmentEnvironment</p><p>http://www.drupalvm.com/</p><p>https://github.com/thom8/drupal8-vagrant</p><p>http://www.drupalvm.com/https://github.com/thom8/drupal8-vagrant</p></li><li><p>Updatingtheproject</p><p>Dependingonthedownloadmethod:</p><p>$ drupal self-update</p><p>$ console self-update</p><p>$ php console.phar self-update</p></li><li><p>WhatcanyoudowithDrupalConsole?</p></li><li><p>Generatethecodeand lesrequiredbyaDrupal8module.</p></li><li><p>generate:module</p></li><li><p>generate:form:con g</p></li><li><p>example.routing.yml</p></li><li><p>src/Form/ExampleForm.php</p></li><li><p>src/Form/ExampleForm.php</p></li><li><p>src/Form/ExampleForm.php</p></li><li><p>generate:plugin:block</p><p>$ drupal generate:plugin:block --module="example" --class-name="ExampleBlock" --label="example_block" --plugin-id="example_block" --no-interaction</p></li><li><p>generate:entity:content</p><p>$ drupal generate:entity:content --module="example" --entity-class="Foo" --entity-name="foo" --no-interaction</p></li><li><p>generate:theme</p><p>$ drupal generate:theme</p></li><li><p>Othergenerators</p><p> generate:authentication:provider generate:entity:config generate:permissions generate:plugin:field generate:plugin:fieldformatter generate:plugin:fieldtype generate:plugin:fieldwidget generate:plugin:imageeffect generate:plugin:rest:resource generate:plugin:rulesaction generate:plugin:type:annotation generate:plugin:type:yaml generate:service</p></li><li><p>InteractwithyourDrupalinstallation.</p></li><li><p>container:debug</p></li><li><p>router:debug</p></li><li><p>router:debug</p></li><li><p>site:mode</p></li><li><p>site</p><p>site site:maintenance [ON/OFF] site:mode [DEV/PROD] site:new [DIRECTORY_NAME] site:status </p></li><li><p>con g</p><p>config config:debug config:edit config:export config:export:content:type config:export:single config:export:view config:import config:import:single config:override </p></li><li><p>user</p><p>user user:login:clear:attempts user:login:url user:password:hash user:password:reset</p></li><li><p>LearnDrupal8.</p></li><li><p>Use--learningoption</p><p>$ drupal generate:controller --module="example" --class-name="ExampleController" --method-name="hello" --route="/hello/{name}" --learning --no-interaction</p></li><li><p>Writeanintegration</p></li><li><p>generate:command</p><p>$ drupal generate:command --module="example" --class-name="HelloCommand" --command="example:hello" --no-interaction</p></li><li><p>webpro ler</p><p>https://www.drupal.org/project/webpro ler</p><p>https://www.drupal.org/project/webprofiler</p></li><li><p>webpro ler:benchmark</p></li><li><p>webpro ler</p><p> webprofiler:benchmark webprofiler:export webprofiler:list </p></li><li><p>Automatecommandexecution</p></li><li><p>chain</p><p>$ drupal chain --file=~/path/to/start-project.yml</p></li><li><p>Tips</p></li><li><p>#Protip1Copycon guration les</p><p>$ drupal init</p><p># ~/.console/config.yml# ~/.console/chain/sample.yml</p></li><li><p>#Protip2Usemultilanguagefeature</p><p># ~/.console/config.yml</p><p>application: environment: 'prod' language: en #available: en,es,fr,hu,pt,ro editor: vim temp: /tmp</p></li><li><p>#Protip3Usedefaultvalues</p><p># ~/.console/config.ymlapplication:</p><p>...</p><p> default: commands: generate: controller: options: module: my_current_project</p></li><li><p>#Protip4Disablecontributedcommands</p><p># ~/.console/config.ymlapplication:</p><p>...</p><p> disable: modules: - broken_module_name_one - broken_module_name_two</p></li><li><p>#Protip5Usecommandalias</p><p>$ drupal cache:rebuild all</p><p>$ drupal c:r all</p></li><li><p>#Protip6Use--helpoption</p><p>$ drupal generate:module --help</p></li><li><p>#Protip7Use--generate-inline</p><p>$ drupal generate:entity:config --generate-inline</p></li><li><p>#Protip8Use--generate-chain</p><p>$ drupal generate:module --generate-chain</p></li><li><p>#Protip9Use--generate-doc</p><p>$ drupal webprofiler:benchmark --generate-doc</p></li><li><p>#Protip10Usepecocommand</p><p>$ drupal router:debug | peco | awk -F ' ' '{print $1}' | xargs drupal router:debug</p><p>https://github.com/peco/peco</p><p>https://github.com/peco/peco</p></li><li><p>Howtocontribute?</p></li><li><p>Gettingtheproject</p><p>ForkyourowncopyoftheConsolerepository</p><p>Cloneyourforkedrepository.</p><p>$ git clone git@github.com:[github-user]/DrupalConsole.git</p><p>Downloaddependenciesusingcomponser.</p><p>$ cd /path/to/DrupalConsole$ composer install</p><p>http://bit.ly/console-fork</p><p>http://bit.ly/console-fork</p></li><li><p>Beforecommitingyourcode</p><p>ProjectcodeisPSR-2CodingStyle.</p><p>GeneratedcodeisDrupalCodingStyle.</p><p>http://www.php-fig.org/psr/psr-2/</p><p>https://www.drupal.org/coding-standards</p><p>http://www.php-fig.org/psr/psr-2/https://www.drupal.org/coding-standards</p></li><li><p>Codeanalysis</p><p>http://bit.ly/console-insight</p><p>http://bit.ly/console-travis</p><p>http://bit.ly/console-insighthttp://bit.ly/console-travis</p></li><li><p>PHPQAall-in-oneAnalyzerCLItool</p><p>PHPParallelLint</p><p>PHP_CodeSniffer</p><p>PHPLOC</p><p>PHPMessDetector</p><p>PHPUnit</p><p>https://github.com/jmolivas/phpqa</p><p>https://github.com/jmolivas/phpqa</p></li><li><p>RunningPHPQAmanually</p><p>$ cd /path/to/DrupalConsole$ phpqa analyze --files=src/</p><p>RunningPHPQAautomatically</p><p>$ vim .git/hooks/pre-commit# Paste this:phpqa analyze --git</p></li><li><p>jmolivas dmouse enzolutions omero danielnv18 vacho esod cordoval Sutharsan chipkaye hugronaphor</p><p>kgaut webflo czettnersandor fluxsauce greg-1-anderson lucasmingarro Crell martinfrances107 bojanz danielrose28</p><p>MiguelC301 azarzag Jaesin rpayanm iadyax alexweber mimioc revagomes Chi-teck egulias heilop</p><p>LowellMontgomery mmenavas sethfischer emacoti jeqq benjy carlosroh edutrul albertvolkman jjcarrion dasjo</p><p>joshuataylor kendallsv kostajh lussoluca stevector ysramirez brantwynn langelhc</p><p>Contributors</p><p>https://github.com/jmolivashttps://github.com/dmousehttps://github.com/enzolutionshttps://github.com/omerohttps://github.com/danielnv18https://github.com/vachohttps://github.com/esodhttps://github.com/cordovalhttps://github.com/Sutharsanhttps://github.com/chipkayehttps://github.com/hugronaphorhttps://github.com/kgauthttps://github.com/webflohttps://github.com/czettnersandorhttps://github.com/fluxsaucehttps://github.com/greg-1-andersonhttps://github.com/lucasmingarrohttps://github.com/Crellhttps://github.com/martinfrances107https://github.com/bojanzhttps://github.com/danielrose28https://github.com/MiguelC301https://github.com/azarzaghttps://github.com/Jaesinhttps://github.com/rpayanmhttps://github.com/iadyaxhttps://github.com/alexweberhttps://github.com/mimiochttps://github.com/revagomeshttps://github.com/Chi-teckhttps://github.com/eguliashttps://github.com/heilophttps://github.com/LowellMontgomeryhttps://github.com/mmenavashttps://github.com/sethfischerhttps://github.com/emacotihttps://github.com/jeqqhttps://github.com/benjyhttps://github.com/carlosrohhttps://github.com/edutrulhttps://github.com/albertvolkmanhttps://github.com/jjcarrionhttps://github.com/dasjohttps://github.com/joshuataylorhttps://github.com/kendallsvhttps://github.com/kostajhhttps://github.com/lussolucahttps://github.com/stevectorhttps://github.com/ysramirezhttps://github.com/brantwynnhttps://github.com/langelhc</p></li><li><p>Wherearetheyfrom</p></li><li><p>Spreadthewordandlove.</p><p>@drupalconsole|#drupalconsole</p><p>/~drupalconsole</p><p>https://gratipay.com/~drupalconsole/</p></li><li><p>Roadmap</p></li><li><p>Remotecommandexecution.</p><p>Increasecodecoverage.</p><p>Multi-sitesupport.</p><p>Improvedocumentationandtranslations.</p><p>Improveverbosecode-output.</p><p>Dummycontentgeneration.</p><p>Con gstagingexport/import.</p><p>Contentstagingexport/import.</p></li><li><p>Milestones</p><p>https://github.com/hechoendrupal/DrupalConsole/milestones</p><p>https://github.com/hechoendrupal/DrupalConsole/milestones</p></li><li><p>Upcommingimplementations</p><p>Metatag</p><p>Rules</p><p>[Yourmodulehere]</p></li><li><p>Let'sworktogethertomake</p><p>awesometoolsevenbetter.</p></li><li><p>Drushintegration</p><p>https://github.com/drush-ops/drush/pull/1337</p><p>https://github.com/drush-ops/drush/pull/1337</p></li><li><p>Onemorething...</p></li><li><p>GUIfortheCLI.</p></li><li><p>http://drupalgenerator.com/</p><p>http://drupalgenerator.com/</p></li><li><p>JoinusatDrupalConAsia2016sprints</p><p>EduardoGarca|@enzolutionswillbeattending.</p></li><li><p>Questions&amp;Feedback</p><p>Feelfreetostalkmeoraskanyquestionat:</p><p>@jmolivas|@drupalconsole</p></li></ul>