feat: add vuebasic template option to ui-bundle generate + unit tests#982
Open
rohitkumarsf wants to merge 2 commits into
Open
feat: add vuebasic template option to ui-bundle generate + unit tests#982rohitkumarsf wants to merge 2 commits into
rohitkumarsf wants to merge 2 commits into
Conversation
Add vuebasic as a new template option for sf template generate ui-bundle command. This mirrors the existing reactbasic pattern and exposes the vuebasic template that will be provided by @salesforce/templates. Changes: - Add 'vuebasic' to template flag options in ui-bundle/index.ts - Add Vue example to ui-bundle.generate.md messages - Add skipped NUT test for vuebasic template (pending upstream support)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
vuebasictemplate option tosf template generate ui-bundleExposes the
vuebasicoption on the--templateflag ofsf template generate ui-bundle, so the CLI can scaffold a Vue 3 UI bundle(backed by the
vuebasicgenerator in@salesforce/templates).Feature changes (already on the branch)
src/commands/template/generate/ui-bundle/index.ts— addedvuebasicto the--templateflag's accepted options.messages/ui-bundle.generate.md— added avuebasicusage example.test/commands/template/generate/ui-bundle/index.nut.ts— added avuebasicNUT, intentionally
describe.skip'd until@salesforce/templateswith vuebasicis published (NUTs need org access + the published upstream).
Tests added in this PR
test/commands/template/generate/ui-bundle/index.test.ts— offline unit teststhat verify the flag change without an org or the published generator:
vuebasicis in the--templateflagoptionsarray['default', 'reactbasic', 'vuebasic']--templatedefaults to'default'--template vuebasicparses without a validation error--templatevalue is rejected with the expected message--nameis requiredVerification
npx tsc -b→ greennpx mocha "test/**/*.test.ts"→ 14 passing (thevuebasicNUT stays skipped)