Skip to content

Instantly share code, notes, and snippets.

@dalehenrich
Last active November 2, 2015 23:41
Show Gist options
  • Save dalehenrich/05f14acee2a8c6daa5b1 to your computer and use it in GitHub Desktop.
Save dalehenrich/05f14acee2a8c6daa5b1 to your computer and use it in GitHub Desktop.
[ :topez :objIn :tokens :command :commandNode |
| opts args |
"for help: ./seasideNewProject -h"
command
getOptsMixedLongShort:
{#('help' $h #'none'). #('stone' nil #'none'). #('local' nil #'none')}
optionsAndArguments: [ :options :operands |
opts := options.
args := operands ].
opts
at: 'help'
ifAbsent: [
| projectTool projectName projectEntryPath packageName gitRootPath browseTool |
projectTool := topez toolInstanceFor: 'project'.
projectEntryPath := opts at: 'stone'
ifPresent: [ :ignored | TDProjectEntryDefinition sys_stone_projects ]
ifAbsent: [
"--local default"
TDProjectEntryDefinition sys_local_server_projects ].
gitRootPath := TDProjectEntryDefinition defaultGitRootPath.
projectName := args at: 1.
packageName := projectName , '-Core'.
projectTool
projectNew: projectName
projectEntryPath: projectEntryPath
packageName: packageName
gitRootPath: gitRootPath
requiredProjects: #('Seaside3')
dependencies: {(packageName -> #('Seaside3'))}
repositories:
{('Seaside3' -> #('github://GsDevKit/Seaside31/3.1.?/repository'))}
superclassName: 'WAComponent'
applicationClassCreationBlock: [].
browseTool := topez toolInstanceFor: 'browse'.
browseTool browseClassesInProject: projectName ]
ifPresent: [] ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment