Skip to content
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

Upload static website files from custom directory #12

Merged
merged 1 commit into from
Nov 24, 2017

Conversation

pradel
Copy link
Contributor

@pradel pradel commented Nov 17, 2017

Thanks for this useful repository :)

This pr close #5.

If the user do not set the distributionFolder it will have the current behavior: deploy the client/dist folder.

For example this will work for create-react-app:

plugins:
  - serverless-finch

custom:
  client:
    bucketName: s3-bucketname-serverless-graphql-apollo
    distributionFolder: build

@fernando-mc
Copy link
Owner

@pradel This works great! Tested it this morning and love it. Only question I have is if we should consider changing distributionFolder to something like websiteFolder or siteFolder. I'm not attached to the 'distribution' terminology.

The reason I kept client/dist as the default folder was because I didn't want to make breaking changes from the (now unsupported) version of the plugin that I forked this from. Let me know your thoughts but I could merge and version this as is.

I may hold off so I can integrate a few more minor changes but I will merge this sometime before Monday.

@pradel
Copy link
Contributor Author

pradel commented Nov 24, 2017

Cool! I will do the change.
Maybe we can just keep the default as it is to avoid breaking changes?

@fernando-mc
Copy link
Owner

Yeah the default will have to remain client/dist I just meant changing the terminology from distribution folder to something else like website folder. But not a big deal. We can keep this PR as is.

Copy link
Owner

@fernando-mc fernando-mc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pradel One quick change. You can make it or I can make it after I merge and setup for a versioned release.

@@ -24,6 +24,7 @@ plugins:
custom:
client:
bucketName: unique-s3-bucketname-for-your-website-files
distributionFolder: client/dist
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an optional configuration value. Can we change this to
# distributionFolder: client/dist

@fernando-mc
Copy link
Owner

I'll make these changes in the versioned release. Merging.

@fernando-mc fernando-mc merged commit 7e35232 into fernando-mc:master Nov 24, 2017
@sid88in
Copy link

sid88in commented Nov 25, 2017

yay

@pradel pradel deleted the custom-path branch November 25, 2017 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upload static website files from custom directory
3 participants