Skip to content

Instantly share code, notes, and snippets.

@hunterloftis
Created April 7, 2015 04:00
Show Gist options
  • Save hunterloftis/f66a15e142828027dbf9 to your computer and use it in GitHub Desktop.
Save hunterloftis/f66a15e142828027dbf9 to your computer and use it in GitHub Desktop.
module.exports = function(topic) {
return {
topic: topic,
command: 'create',
description: 'creates a local development environment',
help: `help text for ${topic}:create`,
flags: [
{ name: 'template', description: 'create a Dockerfile based on a language template', hasValue: true }
],
run: function(context) {
console.log('context:', context.command.flags);
console.log('args:', context.args);
createDockerfile(context.cwd, context.args.template);
createImage(context.cwd);
}
};
};
@hunterloftis
Copy link
Author

$ heroku docker:create --template=node
context: [ { name: 'template',
char: '',
description: 'create a Dockerfile based on a language template',
hasValue: true } ]
args: {}

@hunterloftis
Copy link
Author

$ heroku docker:create --template node
context: [ { name: 'template',
char: '',
description: 'create a Dockerfile based on a language template',
hasValue: true } ]
args: { template: 'node' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment