amazon-archives / aws-amplify-serverless-plugin

Plugin for the Serverless Framework to output AWS Amplify configuration files.
Apache License 2.0
124 stars 30 forks source link

22 refactor write js #23

Closed rayjanwilson closed 5 years ago

rayjanwilson commented 5 years ago

Issue #, if available: 22

Description of changes: currently writeJavaScriptConfiguration creates the file by appending strings.

this can be simplified by building a config object, then using JSON.stringify() with indentation options to accomplish the same thing.

this will allow us to extend the function to support more amplify features

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

adrianhall commented 5 years ago

Thanks for the contribution. I totally get what is going on here, and will adjust to be more indicative of the style that aws-exports.js uses in another check-in.