-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the skeleton of the ScaffoldCommand.
- Loading branch information
Showing
5 changed files
with
48 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# Copyright (c) 2016, Matt Layman | ||
|
||
from handroll.commands.build import BuildCommand | ||
from handroll.commands.scaffold import ScaffoldCommand | ||
from handroll.commands.watch import WatchCommand | ||
|
||
COMMANDS = [ | ||
BuildCommand(), | ||
WatchCommand(), | ||
ScaffoldCommand(), | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (c) 2016, Matt Layman | ||
|
||
from handroll.commands.base import Command | ||
from handroll.i18n import _ | ||
|
||
|
||
class ScaffoldCommand(Command): | ||
|
||
name = 'scaffold' | ||
description = _( | ||
'Make a new handroll site from a scaffold ' | ||
'or list the available scaffolds') | ||
help = _('make a new handroll site') | ||
|
||
def register(self, subparsers): | ||
parser = super(ScaffoldCommand, self).register(subparsers) | ||
parser.add_argument( | ||
'site', nargs='?', help=_('the path to your website')) | ||
|
||
def run(self, args): | ||
# TODO: list the scaffolds | ||
# TODO: remove LIST_SCAFFOLDS constant | ||
# TODO: Make `make` simpler by putting switching logic in command. | ||
pass | ||
# scaffolder.make(args.scaffold, args.site) | ||
# finish() |
This file contains 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
This file contains 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
This file contains 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