Last active
June 30, 2016 23:05
-
-
Save nmquebb/ac70215cf7aafda3f2a1d0bf58eb5130 to your computer and use it in GitHub Desktop.
Install preferred plugins at the beginning of a Craft project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # OCTO CRAFT | |
| # Set plugins to install using craft-cli | |
| # by toggling true or false per plugin. | |
| # | |
| # Instructions: | |
| # brew tap rsanchez/homebrew-craft-cli | |
| # brew install craft-cli | |
| # rake octo:install | |
| plugins = [ | |
| { | |
| :name => 'AM Maps', | |
| :repo => 'am-impact/ammaps', | |
| :description => 'Google Maps fieldtype.', | |
| :install => false | |
| }, | |
| { | |
| :name => 'Cache Monster', | |
| :repo => 'supercool/Cache-Monster', | |
| :description => 'Keeps your cache permanently warm.', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Control Panel Nav', | |
| :repo => 'engram-design/CPNav', | |
| :description => 'Help manage your Control Panel navigation.', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Essence', | |
| :repo => 'joshuabaker/craft-essence', | |
| :description => 'Extract media information from URLs using OEmbed and OpenGraph.', | |
| :install => false | |
| }, | |
| { | |
| :name => 'Field Manager', | |
| :repo => 'engram-design/FieldManager', | |
| :description => 'Makes it easy to manage your fields and field groups.', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Inflect', | |
| :repo => 'lukeholder/craft-inflect', | |
| :description => 'Enables a several Twig filters to transform the inflection of strings.', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Kindling', | |
| :repo => 'imarc/craft-kindling', | |
| :description => 'Twig extension that provides some convienent logic.', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Many To Many', | |
| :repo => 'page-8/craft-manytomany', | |
| :description => 'Allows the management of relationships from both sides.', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Multi Add | Commerce', | |
| :repo => 'engram-design/MultiAdd', | |
| :description => 'Allows you to add multiple products to your cart.', | |
| :install => false | |
| }, | |
| { | |
| :name => 'Navee', | |
| :repo => 'fromtheoutfit/navee', | |
| :description => 'Create and manage navigation menus.', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Placid', | |
| :repo => 'alecritson/Placid', | |
| :description => 'Consume REST services in your twig templates', | |
| :install => false | |
| }, | |
| { | |
| :name => 'Quick Field', | |
| :repo => 'benjamminf/craft-quick-field', | |
| :description => 'Create fields on the fly while designing field layouts.', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Reasons', | |
| :repo => 'mmikkel/Reasons-Craft', | |
| :description => 'Add conditionals to your field layouts', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Retour', | |
| :repo => 'nystudio107/retour', | |
| :description => 'Retour allows you to intelligently redirect legacy URLs, so that you don\'t lose SEO value when rebuilding & restructuring a website.', | |
| :install => false | |
| }, | |
| { | |
| :name => 'SEO Matic', | |
| :repo => 'nystudio107/seomatic', | |
| :description => 'A turnkey SEO implementation', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Similar', | |
| :repo => 'aelvan/Similar-Craft', | |
| :description => 'Find similar elements', | |
| :install => true | |
| }, | |
| { | |
| :name => 'Super Table', | |
| :repo => 'engram-design/SuperTable', | |
| :description => 'Better tables.', | |
| :install => true | |
| } | |
| ] | |
| # craft:octo | |
| namespace :octo do | |
| desc 'Delete plugins' | |
| task :clean do | |
| command = "rm -rf craft/plugins/*" | |
| sh command | |
| end | |
| desc 'Install preferred plugins' | |
| task :install do | |
| plugins.each do |plugin| | |
| puts "" | |
| puts "===================================" | |
| puts "" | |
| if plugin[:install] | |
| puts "Installing #{plugin[:name]}" | |
| command = "craft install:plugin #{plugin[:repo]}" | |
| sh command | |
| puts "Installed #{plugin[:name]}" | |
| else | |
| puts "Didn't install #{plugin[:name]}" | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment