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

Lf/new functions template #205

Merged
merged 15 commits into from
Sep 3, 2020
Merged

Conversation

LisandroFernandezSF
Copy link
Contributor

What does this PR do?

This PR is adding a new project template which copies the same structure than 'empty', but includes a 'functions' folder

What issues does this PR fix or reference?

W-7958785

@LisandroFernandezSF LisandroFernandezSF requested a review from a team as a code owner September 1, 2020 21:05
@LisandroFernandezSF LisandroFernandezSF marked this pull request as draft September 1, 2020 21:06
@LisandroFernandezSF LisandroFernandezSF changed the base branch from main to develop September 1, 2020 21:07

Unverified

No user is associated with the committer email.
@@ -0,0 +1,9 @@
# Salesforce App
Copy link
Contributor

Choose a reason for hiding this comment

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

might be helpful if we have some get started info for users here. @smaddox-sf

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good suggestion that should be addressed as a separate work item for now.

@@ -107,12 +107,13 @@ export interface LightningTestOptions extends TemplateOptions {
export interface ProjectOptions extends TemplateOptions {
projectname: string;
defaultpackagedir: string;
defaultfunctionsdir: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not. It was part of another approach. Fixed!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Unverified

No user is associated with the committer email.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@@ -204,6 +204,18 @@ export default class ProjectGenerator extends SfdxGenerator<ProjectOptions> {
);
}
}

// tslint:disable-next-line:no-unused-expression
if (template === 'functions') {
Copy link
Contributor

@AnanyaJha AnanyaJha Sep 1, 2020

Choose a reason for hiding this comment

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

do we need the tslint disable here? seems like it runs fine without it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

{
"orgName": "<%= company %>",
"edition": "Developer",
"features": []
Copy link
Contributor

Choose a reason for hiding this comment

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

I think functions has it's own scratch org feature that we should add here.Let me confirm the name for it.

…json


There is a specific scratch org feature for functions.

Co-authored-by: lcampos <lcamposguajardo@gmail.com>
@@ -35,7 +35,7 @@ export default class Project extends TemplateCommand {
description: MessageUtil.get('ProjectTemplateFlagDescription'),
longDescription: MessageUtil.get('ProjectTemplateFlagLongDescription'),
default: 'standard',
options: ['standard', 'empty', 'analytics']
options: ['standard', 'empty', 'analytics', 'functions']
Copy link
Contributor

Choose a reason for hiding this comment

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

This is correct but I wonder we might want to keep the functionality strictly to the library for now so that it's not surfaced through the cli command options. What do you think @smaddox-sf ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Circling back from our conversation during standup, we need to remove the changes on this PR that are on the plugin-templates module. The rest can be merged cc @LisandroFernandezSF

@LisandroFernandezSF LisandroFernandezSF marked this pull request as ready for review September 2, 2020 20:22
@LisandroFernandezSF LisandroFernandezSF merged commit 7569076 into develop Sep 3, 2020
@LisandroFernandezSF LisandroFernandezSF deleted the lf/newFunctionsTemplate branch September 3, 2020 16:09
xyc pushed a commit that referenced this pull request Sep 11, 2020
* Adding Functions template

* Adding test for the new template

* Removing unnecessary lines and spaces

* Adding Functions template

* Adding test for the new template

* Removing unnecessary lines and spaces

* Removing unnecessary type and tslint line

* Removing unnecessary type

* Update packages/templates/src/templates/project/functions/ScratchDef.json

There is a specific scratch org feature for functions.

Co-authored-by: lcampos <lcamposguajardo@gmail.com>

* I remove code that affects the plugin

* empty commit

Co-authored-by: lcampos <lcamposguajardo@gmail.com>
@xyc xyc mentioned this pull request Sep 11, 2020
xyc pushed a commit that referenced this pull request Sep 11, 2020
* Update contribution guide (#190)

* add coding and commit guidelines, start developing doc

* update contributing docs

* update develop doc, update launch config

* Update CONTRIBUTING.md

* Update README.md

* Update coding-guidelines.md

* Update commit-guidelines.md

* Update developing.md

* Update CONTRIBUTING.md

Co-authored-by: Xiaoyi Chen <xchen@salesforce.com>

* Update commit-guidelines.md

* Update developing.md

* Update developing.md

* update contributing docs

* Update developing.md

Co-authored-by: Emily Kapner <ekapner@salesforce.com>

* port #186 (#199)

* Update dev scripts (#200)

@W-8017763@

* Remove @salesforce/templates from yarn.lock (#201)

@W-8017763@

* Lf/new functions template (#205)

* Adding Functions template

* Adding test for the new template

* Removing unnecessary lines and spaces

* Adding Functions template

* Adding test for the new template

* Removing unnecessary lines and spaces

* Removing unnecessary type and tslint line

* Removing unnecessary type

* Update packages/templates/src/templates/project/functions/ScratchDef.json

There is a specific scratch org feature for functions.

Co-authored-by: lcampos <lcamposguajardo@gmail.com>

* I remove code that affects the plugin

* empty commit

Co-authored-by: lcampos <lcamposguajardo@gmail.com>

Co-authored-by: Emily Kapner <ekapner@salesforce.com>
Co-authored-by: lcampos <lcamposguajardo@gmail.com>
Co-authored-by: Lisandro Fernandez <70181900+LisandroFernandezSF@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants