Skip to content

Update file-nesting-solution-explorer.md #3877

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

Closed
wants to merge 1 commit into from
Closed
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
96 changes: 90 additions & 6 deletions docs/ide/file-nesting-solution-explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,33 @@ Let’s focus on the node **dependentFileProviders** and its child nodes. Each c

This provider lets you define file nesting rules using specific file extensions. Consider the following example:

![extentionToExtension example rules](media/filenesting_extensiontoextension.png) ![extentionToExtension example effect](media/filenesting_extensiontoextension_effect.png)
```json
"dependentFileProviders": {
"add": {
"extensionToExtension": {
"add": {
".js": [
".ts",
".tsx"
],
".css": [
".scss",
".sass"
],
".html": [
".md",
".markdown"
],
".svgz": [
".svg"
]
}
}
}
}
```

![extentionToExtension example effect](media/filenesting_extensiontoextension_effect.png)

* *cart.js* is nested under *cart.ts* because of the first **extensionToExtension** rule

Expand All @@ -72,7 +98,21 @@ This provider lets you define file nesting rules using specific file extensions.

This provider works just like the **extensionToExtension** provider, with the only difference being that the rule looks at the suffix of the file instead of just the extension. Consider the following example:

![fileSuffixToExtension example rules](media/filenesting_filesuffixtoextension.png) ![fileSuffixToExtension example effect](media/filenesting_filesuffixtoextension_effect.png)
```json
"dependentFileProviders": {
"add": {
"fileSuffixToExtension": {
"add": {
"-vsdoc.js": [
".js",
]
}
}
}
}
```

![fileSuffixToExtension example effect](media/filenesting_filesuffixtoextension_effect.png)

* *portal-vsdoc.js* is nested under *portal.js* because of the **fileSuffixToExtension** rule

Expand All @@ -84,7 +124,15 @@ This provider nests files with an additional extension under the file without an

Consider the following example:

![addedExtension example rules](media/filenesting_addedextension.png) ![addedExtension example effect](media/filenesting_addedextension_effect.png)
```json
"dependentFileProviders": {
"add": {
"addedExtension": {}
}
}
```

![addedExtension example effect](media/filenesting_addedextension_effect.png)

* *file.html.css* is nested under *file.html* because of the **addedExtension** rule

Expand All @@ -97,7 +145,15 @@ This provider nests files with an additional extension under a file without an a

Consider the following example:

![pathSegment example rules](media/filenesting_pathsegment.png) ![pathSegment example effect](media/filenesting_pathsegment_effect.png)
```json
"dependentFileProviders": {
"add": {
"pathSegment": {}
}
}
```

![pathSegment example effect](media/filenesting_pathsegment_effect.png)

* *jquery.min.js* is nested under *jquery.js* because of the **pathSegment** rule

Expand All @@ -122,15 +178,43 @@ Consider the following example:

This provider lets you define file nesting rules for files with any extension but the same base file name. Consider the following example:

![allExtensions example rules](media/filenesting_allextensions.png) ![allExtensions example effect](media/filenesting_allextensions_effect.png)
```json
"dependentFileProviders": {
"add": {
"allExtensions": {
"add": {
".*": [
".tt"
]
}
}
}
}
```

![allExtensions example effect](media/filenesting_allextensions_effect.png)

* *template.cs* and *template.doc* are nested under *template.tt* because of the **allExtensions** rule.

### The fileToFile provider

This provider lets you define file nesting rules based on entire filenames. Consider the following example:

![fileToFile example rules](media/filenesting_filetofile.png) ![fileToFile example effect](media/filenesting_filetofile_effect.png)
```json
"dependentFileProviders": {
"add": {
"fileToFile": {
"add": {
".bowerrc": [
"bower.json"
]
}
}
}
}
```

![fileToFile example effect](media/filenesting_filetofile_effect.png)

* *.bowerrc* is nested under *bower.json* because of the **fileToFile** rule

Expand Down