-
Notifications
You must be signed in to change notification settings - Fork 12
Quick poc for new project config #19
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
base: main
Are you sure you want to change the base?
Conversation
| @@ -2,14 +2,5 @@ | |||
| "name": "Example App", | |||
| "description": "An example private app that contains a single card extension.", | |||
| "scopes": ["crm.objects.contacts.read", "crm.objects.contacts.write"], | |||
| "public": false, | |||
| "extensions": { | |||
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.
This is replaced by new naming conventions:
- app.functions -> app.extensions
- example-card.js -> example-card.card.js
| const axios = require("axios"); | ||
|
|
||
| exports.main = async (context = {}, sendResponse) => { | ||
| const appConfig = { |
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.
This replaces example-card.json. It also replaces serverless.json b/c secrets is moved into this json. We no longer need a file that links the appFunction to the app config because they live in the same file.
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 like this first version. I'm sure you all will discuss more and iterate on this, but pumped to see where it's going.
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.
Does app config in code invite dynamicism?
| @@ -1,4 +1,3 @@ | |||
| { | |||
| "name": "project_name", | |||
| "srcDir": "src" | |||
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.
This is an example of where we can implement convention over configuration. By default we will assume the src folder is the srcDir. The user is able to override this default behavior though.
Just a POC, not intended to be merged!
This makes a few pretty drastic changes to the project structure just to highlight some ideas. The main goal was to see how much overall configuration we could (potentially) get rid of. Presumably, removing the total amount of configuration would make it easier to create a system that prioritizes convention, but also supports overrides to the default behavior via configuration.This is purely just for the sake of conversation. More info in comments.