[TIMOB-28070] TiAPI: Add vscode json files to app templates
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Low |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2020-09-08T13:09:31.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 9.2.0 |
| Components | Android, iOS |
| Labels | app, editor, template, vscode |
| Reporter | Joshua Quick |
| Assignee | Joshua Quick |
| Created | 2020-08-05T22:13:25.000+0000 |
| Updated | 2020-09-08T13:09:31.000+0000 |
Description
*Summary:*
We should add
.vscode/ JSON configuration files to our Titanium app templates which hide the generated folders (like the "build" folder) and suggest VS Code users to use our extension.
*Classic App Folder Exclusion:*
For Classic apps, we only need to hide the ./build folder from the editor and exclude it from file monitoring/search.
.vscode/settings.json
{
"files.exclude": {
"build/": true
},
"search.exclude": {
"build/": true
},
"files.watcherExclude": {
"build/": true
},
}
*Alloy/Angular App Folder Exclusion:*
For all other app templates, the project's root ./i18n, ./platform, and ./Resources folders are generated from the project's ./app folder. So, these folders need to be excluded as well.
.vscode/settings.json
{
"files.exclude": {
"build/": true,
"i18n/": true,
"platform/": true,
"Resources/": true
},
"search.exclude": {
"build/": true,
"i18n/": true,
"platform/": true,
"Resources/": true
},
"files.watcherExclude": {
"build/": true,
"i18n/": true,
"platform/": true,
"Resources/": true
}
}
*Promoting Titanium's Extension:*
When opening the app project folder in VS Code, we can have the editor recommend the end-user to use our Titanium extension by adding the following JSON file.
.vscode/extensions.json
{
"recommendations": [
"axway.vscode-titanium"
]
}
PR (master): https://github.com/appcelerator/titanium_mobile/pull/11870
FR Passed, waiting on Jenkins build
merged to master, backported by [~eharris] to 9_3_X
*Closing ticket*. improvement verified in SDK version
9.2.0.v20200908050955, and9.3.0.v20200908051946. Test and other information can be found at: PR (master): https://github.com/appcelerator/titanium_mobile/pull/11870