-
Notifications
You must be signed in to change notification settings - Fork 611
updated getting started docs #7168
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -72,7 +72,7 @@ export default function () { | |||||||||||||||||||||||||||||||||||||||||||||||
| <h3>Install the package</h3> | ||||||||||||||||||||||||||||||||||||||||||||||||
| <CodeBlock>npm install @microsoft/fast-element</CodeBlock> | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| <h3>Create a web component</h3> | ||||||||||||||||||||||||||||||||||||||||||||||||
| <h3>Create a web component in the file `hello-world.ts`</h3> | ||||||||||||||||||||||||||||||||||||||||||||||||
| <CodeBlock language="typescript"> | ||||||||||||||||||||||||||||||||||||||||||||||||
| {`/* | ||||||||||||||||||||||||||||||||||||||||||||||||
| * import utilities from @microsoft/fast-element | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -106,6 +106,20 @@ HelloWorld.define({ | |||||||||||||||||||||||||||||||||||||||||||||||
| <CodeBlock language="html"> | ||||||||||||||||||||||||||||||||||||||||||||||||
| {`<hello-world name="Earth"></hello-world>`} | ||||||||||||||||||||||||||||||||||||||||||||||||
| </CodeBlock> | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| <h3>Update your tsconfig.json file to support decorators</h3> | ||||||||||||||||||||||||||||||||||||||||||||||||
| <CodeBlock language="json"> | ||||||||||||||||||||||||||||||||||||||||||||||||
| {{ | ||||||||||||||||||||||||||||||||||||||||||||||||
| "compilerOptions": { | ||||||||||||||||||||||||||||||||||||||||||||||||
| "experimentalDecorators": true, | ||||||||||||||||||||||||||||||||||||||||||||||||
| "emitDecoratorMetadata": true, | ||||||||||||||||||||||||||||||||||||||||||||||||
| "module": "ESNext", | ||||||||||||||||||||||||||||||||||||||||||||||||
| "moduleResolution": "bundler", | ||||||||||||||||||||||||||||||||||||||||||||||||
| "target": "ES2020", | ||||||||||||||||||||||||||||||||||||||||||||||||
| "useDefineForClassFields": false | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||||||||||||||||
| </CodeBlock> | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+111
to
+122
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's currently an error with the contents of the code block, it needs to be wrapped in back ticks instead of a double curly brace. Whitespace is also preserved in the rendered output so the formatting needs to be adjusted. The only suggestion I have is to remove The required tsconfig can technically be reduced even further to just
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||
| </section> | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| <div role="separator" className="section-decoration"></div> | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
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.
Thanks for this! I do wonder if it makes sense to put the tsconfig implementation below
installin scenarios where folks don't see it working right away without this.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 haven't had a chance to pull down the PR and run it yet, but I think the minimum required tsconfig can be stripped down further from here.
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'm fine with the location of tsconfig being moved down on the page and with it being stripped it down to the minimum required.
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.
Sounds good - to be clear, I think this can go above
npm installjust since it's "required configuration" right now.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'll have some time today to pull down and provide a more thorough review. I appreciate your patience.