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

feat: add project name to generator #296

Merged
merged 2 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ If you're interested in contributing, take a look at the [CONTRIBUTING](CONTRIBU

If you're interested in building the plugin and library locally, take a look at the development [doc](contributing/developing.md).

You can find more information about commands that the plugin provide in the [commands](COMMAND.md) doc.
You can find more information about commands that the plugin provide in the [commands](COMMAND.md) doc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ describe('Project creation tests:', () => {
path.join('foo', 'sfdx-project.json'),
'"sfdcLoginUrl": "https://login.salesforce.com"'
);
assert.fileContent(
path.join('foo', 'sfdx-project.json'),
'"name": "foo"'
);

for (const file of vscodearray) {
assert.file([path.join('foo', '.vscode', `${file}.json`)]);
Expand Down
3 changes: 2 additions & 1 deletion packages/templates/src/generators/projectGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export default class ProjectGenerator extends SfdxGenerator<ProjectOptions> {
defaultpackagedir,
namespace: ns,
loginurl,
apiversion
apiversion,
name: projectname
}
);

Expand Down
1 change: 1 addition & 0 deletions packages/templates/src/templates/project/sfdx-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"default": true
}
],
"name": "<%= name %>",
"namespace": "<%= namespace %>",
"sfdcLoginUrl": "<%= loginurl %>",
"sourceApiVersion": "<%= apiversion %>"
Expand Down