Open tcodes0 opened 4 years ago
Great thinking, with you on all of it. A question though,
App.js would be a little harder. I'm thinking we can host a sample App.js file for each use-case and just download that to user's repo. Also possible to manipulate the code directly using AST.
What are the use-cases you're seeing?
I had initially envisioned one standard app.js file which would be part of craaa and simply copied into place
So far only one use case: The graphql api can have multiple auth modes and these mode have different code on App.js. The current App.js is based off of gregoire's demo and I'm taking it a little further to make sure it's all working together.
Amplify supports four auth mode I think, gregoire's library supports cognito by default but during amplify setup user is given all four choices
Hmmmm ya... And auth is one thing that definitely benefits from automated defaults.
Can we abstract the auth and inject it through a consistent interface/application in app.js
Also, at this point for minimum viable/delightful product I'm personally okay with it just supporting incognito... Open to other perspectives though
I think we can get most of the generation done using a cli helper (like commander) and some nodejs code. We'd be mostly automating the process of calling the CRA and NPM manually. I think that should get us pretty fat.
App.js would be a little harder. I'm thinking we can host a sample App.js file for each use-case and just download that to user's repo. Also possible to manipulate the code directly using AST.