-
Notifications
You must be signed in to change notification settings - Fork 137
Stackblitz support instructions
stefanoScalzo edited this page Jan 30, 2020
·
8 revisions
- Selectors end with -example
- If there is a css associated to the example, it is in a scss file and not inline.
- Make sure all filenames end with -example
- If and only if all components contain just the templateUrl and selector are they allowed to be in the same .ts file. Otherwise place them in their own typescript files.
- Make sure the selector corresponds to the filename
- Add the example to the component’s docs.html and be sure to give the Example File a name
- Go to the docs folder of the example component you are in.
- Go to the array of Example Files
- Import all files using import * as nameUsedInExampleFile from '!raw-loader!./pathToFile 5. Make sure the secondary files and tertiary .ts files are placed in the order below
{
language: 'html'
fileName: 'name-of-file-example'
code: nameOfExampleHtml
component: 'nameOfComponentInTsFile'
typescriptFileCode: nameOfExampleTs
scssFileCode: nameOfExampleScss //if applicable
}
{
language: 'html'
fileName: 'name-of-file-example'
code: nameOfExampleHtml
component: 'nameOfComponentInTsFile'
second-file: 'nameOfTsFileThatSharesCode'
typescriptFileCode: nameOfExampleTs
scssFileCode: nameOfExampleScss
}
{
language: 'html'
fileName: 'name-of-file-example'
code: nameOfExampleHtml
scssFileCode: nameOfExampleScss
},
{
language: 'typescript'
component: 'nameOfComponentInTsFile'
fileName: nameOfTsFile-example
code: nameOfExampleTs
}
When Modules require more than one component or any specific adding not given from the default, create a module file and link it.
{
language: ‘html’
fileName: ‘name-of-file-example’
code: nameOfExampleHtml
scssFileCode: nameOfExampleScss //if applicable
},
{
language: 'typescript',
code: nameOfExampleTs,
name: ‘Name Displayed On site',
thirdFile: ‘filename-3—example’,
fileName: 'filename-3—example',
component: 'nameOfThirdComponent'
imports: 'all extra imports needed'(using backticks)
declarationArray: 'All extra components'
(if needed) entryComponent: 'list of entry components'
},
{
language: 'typescript',
code: nameOfExampleTs,
name: 'Name Displayed On site',
secondFile: 'second-example',
fileName: 'second-example',
component: 'nameOfSecondComponent'
},
{
language: 'typescript',
code: nameOfExampleTs,
fileName: ‘main-typescript-example',
component: 'MainComponent'
}