diff piecrust/plugins/builtin.py @ 305:9ae23409d6e9

plugins: Change how plugins are loaded. Add a `plugins` command.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 22 Mar 2015 22:20:18 -0700
parents 103abb08755e
children ee3fe63cc51d
line wrap: on
line diff
--- a/piecrust/plugins/builtin.py	Thu Mar 19 22:05:30 2015 -0700
+++ b/piecrust/plugins/builtin.py	Sun Mar 22 22:20:18 2015 -0700
@@ -4,6 +4,7 @@
 from piecrust.commands.builtin.info import (
         RootCommand, ShowConfigCommand,
         FindCommand, ShowSourcesCommand, ShowRoutesCommand, ShowPathsCommand)
+from piecrust.commands.builtin.plugins import PluginsCommand
 from piecrust.commands.builtin.scaffolding import (
         PrepareCommand,
         DefaultPrepareTemplatesCommandExtension,
@@ -41,9 +42,7 @@
 
 
 class BuiltInPlugin(PieCrustPlugin):
-    def __init__(self):
-        super(BuiltInPlugin, self).__init__()
-        self.name = '__builtin__'
+    name = '__builtin__'
 
     def getCommands(self):
         return [
@@ -59,6 +58,7 @@
                 ShowRoutesCommand(),
                 ShowPathsCommand(),
                 ThemesCommand(),
+                PluginsCommand(),
                 BakeCommand(),
                 ShowRecordCommand(),
                 ServeCommand()]