Skip to content

Add multi-file support for new #20

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

Closed
dkundel opened this issue Jul 3, 2019 · 1 comment
Closed

Add multi-file support for new #20

dkundel opened this issue Jul 3, 2019 · 1 comment
Labels

Comments

@dkundel
Copy link
Contributor

dkundel commented Jul 3, 2019

Right now we can only create one Function with twilio-run new but it should support multiple files with Functions and Assets

@dkundel dkundel added the v-next label Jul 3, 2019
@philnash
Copy link
Contributor

If twilio-run new will get the functions from twilio-labs/function-templates should we just enforce that each template in that repo follows the functions/ and assets/ pattern from twilio-run?

philnash added a commit to philnash/twilio-run that referenced this issue Jul 17, 2019
Uses the new layout of the functions-templates project to download multiple file templates into a
twilio-run project. Templates will be downloaded into the functions/{bundleName} and
assets/{bundleName} directories within the project.

This also allows for passing an empty bundleName (or filename in the twilio-run CLI parlance right
 now). When empty, this adds the functions/assets directly into the functions/assets directories.
This will be used for `create-twilio-function` template options. The twilio-run CLI still enforces
a name.

BREAKING CHANGE: This needs the functions-templates repo to be up to date. Currently it points to
the next branch, which is up to date.

re twilio-labs#20
dkundel pushed a commit that referenced this issue Jul 19, 2019
Uses the new layout of the functions-templates project to download multiple file templates into a
twilio-run project. Templates will be downloaded into the functions/{bundleName} and
assets/{bundleName} directories within the project.

This also allows for passing an empty bundleName (or filename in the twilio-run CLI parlance right
 now). When empty, this adds the functions/assets directly into the functions/assets directories.
This will be used for `create-twilio-function` template options. The twilio-run CLI still enforces
a name.

BREAKING CHANGE: This needs the functions-templates repo to be up to date. Currently it points to
the next branch, which is up to date.

re #20
dkundel added a commit that referenced this issue Jul 19, 2019
This commit renames the "filename" argument to "namespace", creates the assets folder only when
assets exist and skips installing dependencies if unnecessary

re: #20
@dkundel dkundel closed this as completed Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants