-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cli] generate command to create scaffolding #682
Conversation
75403a1
to
db335a5
Compare
-- This is a {{ policy.name }} description. | ||
|
||
local policy = require('apicast.policy') | ||
local _M = policy.new('{{ policy.summary }}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be policy.name
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. It should be some human name.
gateway/Roverfile.lock
Outdated
@@ -1,4 +1,4 @@ | |||
argparse 0.5.0-1||production | |||
argparse 0.6.0-1||production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the new version for some reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No good reason. rover is not so smart about releasing locked versions.
|
||
local directory = function(dir) if pl.path.dir(dir) then return pl.path.abspath(dir) end end | ||
|
||
return function(parser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the option for summary
is missing.
|
||
function _M.copy(source, destination, env, force) | ||
print('source: ', source) | ||
print('destinatioon: ', destination) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
Looks good 👍 Can you mention this option somewhere in the |
* create templated files and directories to make it easier to create new policies, cli commands, etc.
The idea is to replace the need to copy-paste with scaffolding.