You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,16 @@ This section outlines the main concepts and definitions used in *Web Template St
6
6
7
7
*Web Template Studio* is divided in the following main elements:
8
8
9
-
-**Extension**: Refers to the Visual Studio Code Extension project, which, once installed, allows users to have an improved experience when creating a new Web Application from the `Web Template Studio: [command name]` command. The extension is written in typescript.
9
+
-**Extension**: Refers to the Visual Studio Code Extension project, which, once installed, allows users to have an improved experience when creating a new Web or React Native Application. The extension is written in typescript.
10
+
11
+
The extension is started by using the the `Web Template Studio: [command name]` command. Currently available commands are:
12
+
- Web Template Studio: Create Web App
13
+
- Web Template Studio: Create React Native App
14
+
- Web Template Studio: Deploy Web App
10
15
11
-
Can check available commands [here](./contributing/application-architecture.md#extension).
12
16
-**Wizard**: Refers to the WebTS client project, where all user interaction occurs after launching *Web Template Studio*. The Wizard guides the user through some steps to create the desired project. It allows the user to select from the available frameworks, pages and Azure Cloud Services. The wizard is created with React Typescript and is displayed through the React Panel.
13
17
-**Core Template Studio and Core Template Studio CLI**: Refers to the .NET Core executable that handles all of the template synchronization and code generation (composition, generation + postaction execution). The CLI is the entry point for executing commands on Core Template Studio executable. CoreTS CLI is a self-contained .NET Core 3.1 application.
14
-
-**Template**: A template contains code with metadata. The metadata will contain the following template information: name, description, licensing, remarks, programming language, type, etc. The template definition is based on [dotnet Template Engine](https://github.com/dotnet/templating). [More details on templates](./contributing/templates.md)
18
+
-**Template**: A template contains code with metadata. The metadata will contain the following template information: name, description, licensing, remarks, programming language, type, etc. The template definition is based on [dotnet Template Engine](https://github.com/dotnet/templating). For more details templates see [Understanding the Templates](./contributing/templates.md)
Copy file name to clipboardExpand all lines: docs/contributing/getting-started-developers.md
+65-11Lines changed: 65 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,11 @@ This document covers:
9
9
-[Core Template Studio Submodule](#core-template-studio-submodule)
10
10
-[How to run the extension locally](#how-to-run-the-extension-locally)
11
11
-[How to develop the client](#how-to-develop-the-client)
12
+
-[Troubleshooting](#troubleshooting)
12
13
-[How to build a local vsix](#how-to-build-a-local-vsix)
13
14
-[Tests](#tests)
14
15
-[Under the hood](#under-the-hood)
16
+
-[Folder overview](#folder-overview)
15
17
16
18
Before starting make sure you read the [Web Template Studio arquitecture](application-architecture.md) document.
17
19
@@ -29,15 +31,16 @@ If you just want to take advantage from *Web Template Studio* extension, check t
29
31
1. Run the command `npm config set scripts-prepend-node-path true`. This tells VSCode which Node version to run during the extension compilation (otherwise you'll get an error during the build process).
30
32
31
33
### For a react native application
32
-
1. You have to check the following [dependencies](https://microsoft.github.io/react-native-windows/docs/rnw-dependencies).
34
+
You have to check the following [dependencies](https://microsoft.github.io/react-native-windows/docs/rnw-dependencies).
33
35
34
-
In the Wizard you have a link on the right-side bar, to show a modal with the System Requirements.
36
+
In the Wizard you have a link on the right-side bar, to show a modal with the System Requirements. If any of them is missing you will see a warning.
35
37
36
-
<imgalt="React Native System Requirements"src="../resources/react-native-requirements.png"width="85%" />
38
+
If you are running `WebTS` in Mac/Linux you will see a different message, notifying you that the generated native Windows application cannot be run.
37
39
38
-
**Note**: If using Windows, use Git Bash.
40
+
<img alt="React Native System Requirements" src="../resources/react-native-requirements.png" width="85%" />
39
41
40
-
At some point you may also need to install [React-scripts](https://yarnpkg.com/package/react-scripts) and [Typescript](https://www.typescriptlang.org/).
42
+
43
+
**Note**: When developing in `WebTS` you may also need to install [React-scripts](https://yarnpkg.com/package/react-scripts) and [Typescript](https://www.typescriptlang.org/).
41
44
42
45
## Project folder structure
43
46
@@ -92,7 +95,11 @@ Core Template Studio is integrated into *Web Template Studio* using a git submod
92
95
When you clone *Web Template Studio* you have to run two commands: `git submodule init` and `git submodule update` to fetch all the data from Core Template Studio. When fetching changes, also execute `git submodule update` after doing git fetch to be sure you're submodule is up to date.
93
96
94
97
### Update with remote changes
95
-
Changes on Core Template Studio should be done on the Core Template Studio repos. In WebTS, to update the submodule to the most recent commit, you have to run the command: `git submodule update --remote`.
98
+
Changes on Core Template Studio should be done on the Core Template Studio repos. In WebTS, to update the submodule to the most recent commit, you have to run the command: `git submodule update --remote`.
99
+
100
+
This will require a new `git submodule update` on other local repositories to get the update.
101
+
102
+
For more info visit the [official documentation](https://git-scm.com/docs/git-submodule).
96
103
97
104
## How to run the extension locally
98
105
1. Run `./build-all.sh` from the `_build` folder. This script installs dependencies and compiles the client and core template studio and copies it to the extension. It also builds and installs the extension.
@@ -117,9 +124,12 @@ Changes on Core Template Studio should be done on the Core Template Studio repos
117
124
As the client is injected as a static web app in the webview of the extension, debugging inside the extension can be challenging. Running the client in a browser is useful for quickly testing HTML or CSS changes and for debugging since you can use **Chrome extensions** such as `React and Redux developer tools`.
118
125
119
126
When running in the browser, communication with the extension is done against the mock `mockVsCodeApi.ts` in the `mockData` folder. Note that the behaviour of the client on the browser may differ from the behaviour in the extension, so make sure to test out both.
127
+
120
128
Styles are mocked in the Browser using the file [`mockThemes.css`](../../src/client/src/css/mockThemes.css).
121
129
122
-
1. Run `./build-client.sh` from the _build folder.
130
+
To choose what platform you want to debug, you can modify `mockConfig.ts` in the `mockData`folder.
131
+
132
+
1. Run `./build-client.sh` from the `_build` folder. Or you can use the command `yarn build` if you are on the `client` folder already.
123
133
2. Open the `src/client` folder using `VSCode`.
124
134
3. Start the client using `yarn start` to begin development in the browser. We recommend using a chromium based browser such as Chrome.
125
135
@@ -129,7 +139,7 @@ Styles are mocked in the Browser using the file [`mockThemes.css`](../../src/cli
129
139
130
140
### To debug from Visual Studio Code:
131
141
Install [Debugger for Chrome extension](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) in Visual Studio Code debug Wizard Client.
132
-
After starting the client using `yarn start` in VSCode Debug View (`Ctrl + Shift ⇧ + D` (Windows/Linux) or `Shift ⇧ + Command ⌘ + D` (Mac) in Visual Studio Code) select "*Debug WebTS Client*" and start debugging (`F5`).
142
+
After starting the client using `yarn start` in VSCode Debug View (`Ctrl + Shift ⇧ + D` (Windows/Linux) or `Shift ⇧ + Command ⌘ + D` (Mac) in Visual Studio Code) select "*Debug WebTS Client*" and start debugging (you can directly press: `F5`).
133
143
134
144
#### More info:
135
145
-[Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome)
@@ -155,10 +165,14 @@ After installation, use `Ctrl + Shift ⇧ + P` (Windows/Linux) or `Command ⌘ +
155
165
You can check available commands [here](./contributing/application-architecture.md#extension).
156
166
157
167
### Possible problems and workarounds to fix them
158
-
1. You may get some errors on the output console for the extension: `webtemplatestudio-{env}`, or maybe you realise that there´s missing information displayed on the screen.
159
-
For example, no Frameworks at all for the `Create Web App` command. Make sure you have the proper versions of the .mstx for the templates in the extension folder - as mentioned above, for *Windows* would be `%USERPROFILE%\.vscode\extensions\wasteamaccount.webtemplatestudio-{environment}-{version}\src\corets-cli` or in *Mac/Linux*`~/.vscode/extensions/wasteamaccount.webtemplatestudio-{environment}-{version}/src/corets-cli`.
168
+
You may get some errors on the output console for the extension: `webtemplatestudio-{env}`, or maybe you realise that there´s missing information displayed on the screen.
169
+
For example, no Frameworks at all for the `Create Web App` command. Make sure you have the proper versions of the `.mstx` for the templates in the extension folder - as mentioned above, for *Windows* would be `%USERPROFILE%\.vscode\extensions\wasteamaccount.webtemplatestudio-{environment}-{version}\src\corets-cli` or in *Mac/Linux*`~/.vscode/extensions/wasteamaccount.webtemplatestudio-{environment}-{version}/src/corets-cli`.
170
+
171
+
If that´s not the case, and you have an older version, or you´re missing some package of templates, then you will need to retrieve them from the generated `.vsix`.
172
+
1. You can follow [the following instructions](https://github.com/microsoft/CoreTemplateStudio/wiki/Tools:-WTS-Packaging-Tool) to create the package.
173
+
2. If you have permissions, you can download the `.vsix` from the *Build Pipeline*.
160
174
161
-
If that´s not the case, and you have an older version, or you´re missing some package of templates, then you will need to retrieve them from the generated .vsix in the [Build Pipeline](https://winappstudio.visualstudio.com/Vegas). Also will need to update the `Allowed Packages` with the .mstx hashes in the file `CoreTemplateStudio.config` within the proper folder depending on the OS you are working (*win21* for instance, when developing on *Windows* for example).
175
+
**Note**: You will also need to update the `Allowed Packages` with the `.mstx` hashes in the file `CoreTemplateStudio.config` within the proper folder depending on the OS you are working (*win32* for instance, when developing on *Windows* for example).
162
176
163
177
<imgalt="Install extension from .vsix"src="../resources/vscode-output-window-errors.png"width="500px" />
164
178
<imgalt="Folder where you can find the .mstx for the templates"src="../resources/extension-folder-mstx.png"width="400px" />
@@ -194,6 +208,46 @@ repository by [rebornix](https://github.com/rebornix):
194
208
- For all resources going to the webview, their scheme is `vscode-resource`
195
209
- We add a baseUrl `<base href="${vscode.Uri.file(path.join(this._extensionPath, 'build')).with({ scheme: 'vscode-resource' })}/">` and then all relative paths work.
196
210
211
+
## Troubleshooting
212
+
You may encounter some issues when using or developing in WebTS. It could be due to folder permissions, missing to create the Template packages,... Find below a list of folders that you may be interested in visiting and removing if this happens to you.
213
+
214
+
- You need permissions to write on the local `WebTS` folder, where you can find the `Logs` and `Templates` folders.
215
+
216
+
- Web Template Studio may be missing execute permissions on the `corets-cli` folder, can check full path on the table below, where the Core Template Studio CLI is located.
217
+
218
+
- The template cache is located in the `.templateengine` folder. Template caches are isolated by environment.
219
+
220
+
**Note**: If you clean or remove the corets-cli folder, you should make sure that you re run the build-all.sh script. Otherwise, if you removed the Templates or the Template Cache, you need to Launch the `Web Template Studio` wizard again.
221
+
222
+
**Warning**: When you are debugging the application, a shortcut to the `Templates` folder of your code is used. Mind that everything you modified there, will be changed on the **local repository**.
223
+
224
+
## Useful folders
225
+
To make it easier for you to see which folder is used on the different OS, we added a summary table below:
226
+
227
+
| Environment | Description | Folder |
228
+
| ----------- | ------ | ----------- |
229
+
|`Windows`| Core Template Studio CLI |`%userprofile%\.vscode\extensions\wasteamaccount.webtemplatestudio-[environment]-[version]\src\corets-cli\`|
Copy file name to clipboardExpand all lines: docs/generated-apps/web/deployment.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,14 +37,14 @@ This folder will contain all the necessary frontend and backend files for the de
37
37
38
38
*Web Template Studio* will then automatically launch the command `Azure App Service: Deploy to Web App...`, which will be in charge of deploying the application to an *Azure App Service*.
39
39
40
-
- If you have added an *Azure App Service* when creating your application with *Web Template Studio*, the application already has a deployment configuration, so it will use the created *Azure App Service*.
41
-
42
-
- Otherwise, the *Azure App Service* extension will ask you for the configuration settings to create a new *Azure App Service*:
43
-
- The folder that contains the app to deploy to the App Service. Select the `publish` folder for deployment to be successful.
44
-
- Select `Create New Web App...`
45
-
- Enter your web app name
46
-
- Select Linux as your OS
47
-
- Select Node.js 12 LTS for a Node/Express application, Python 3.7 for a Flask application or .Net Core Latest runtime for ASP .NET application.
40
+
- If you have added an *Azure App Service* when creating your application with *Web Template Studio*, the application already has a deployment configuration, so it will use the created *Azure App Service*.
41
+
42
+
- Otherwise, the *Azure App Service* extension will ask you for the configuration settings to create a new *Azure App Service*:
43
+
- The folder that contains the app to deploy to the App Service. Select the `publish` folder for deployment to be successful.
44
+
- Select `Create New Web App...`
45
+
- Enter your web app name
46
+
- Select Linux as your OS
47
+
- Select Node.js 12 LTS for a Node/Express application, Python 3.7 for a Flask application or .Net Core Latest runtime for ASP .NET application.
48
48
49
49
Start the application deployment to *Azure App Service*. We can see the progress of the deployment in the output of the *Azure App Service* extension.
0 commit comments