Skip to content

Commit 0ed54e2

Browse files
authored
Merge pull request #1683 from microsoft/dev
Sync from dev
2 parents 13db8e3 + 41621de commit 0ed54e2

926 files changed

Lines changed: 9140 additions & 12231 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# At least one of the code owners below will be required on each PR:
2-
* @sibille @mvegaca @dgomezc @trevorNgo @jcoc611-microsoft @piotrmark @MehaKaushik @Tanya0609 @javieraparisivaldes
2+
* @sibille @mvegaca @dgomezc @trevorNgo @jcoc611-microsoft @piotrmark @MehaKaushik @Tanya0609 @prupipho
33

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ BenchmarkDotNet.Artifacts/
5252
project.lock.json
5353
project.fragment.lock.json
5454
artifacts/
55-
**/Properties/launchSettings.json
5655

5756
# StyleCop
5857
StyleCopReport.xml
@@ -369,3 +368,5 @@ src/extension/src/corets-cli/win32/
369368

370369
# Template tests
371370
template_test/
371+
src/client/src/translations/en.json
372+
src/client/src/translations/whitelist_en.json

CONTRIBUTING.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Contributing to Web Template Studio
22

3-
The foundation of _Web Template Studio_ is to get developers up and running with a new
3+
The foundation of *Web Template Studio* is to get developers up and running with a new
44
web app that incorporates cloud services on Azure as fast as possible.
55

6-
Using Web Template Studio, a developer can select their preferred web
6+
Using *Web Template Studio*, a developer can select their preferred web
77
frameworks, pages and Azure cloud services to generate boilerplate code for their web app.
88
The generated code not only follows best practices and design guidelines, but also
99
includes comments to guide the developer through the logic and adding functionality to
@@ -72,9 +72,7 @@ We encourage developers to consider the following guidelines when submitting pul
7272

7373
## Naming and styling conventions
7474

75-
All code that gets merged in must be formatted with [Prettier](https://prettier.io/). Also,
76-
we use [TSLint](https://palantir.github.io/tslint/) to lint our TypeScript code and [ESLint](https://eslint.org/)
77-
for JavaScript.
75+
All code that gets merged in must be formatted with [Prettier](https://prettier.io/). Also, we use [ESLint](hhttps://eslint.org/) to lint our code.
7876

7977
## Documentation
8078

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<img src="https://img.shields.io/badge/platform-linux--64%20%7C%20win--64%20%7C%20osx--64%20-lightgrey.svg" alt="Platforms Supported: MacOSX, Linux, Windows"/> <a href="https://www.repostatus.org/#active"><img src="https://www.repostatus.org/badges/latest/active.svg" alt="Project Status: Active – The project has reached a stable, usable state and is being actively developed." /></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: We are using the MIT License"></a> <a href="CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg" alt="We are welcoming PRS!"></a>
44

5-
Microsoft Web Template Studio (_WebTS_) is a Visual Studio Code Extension that accelerates the creation of new web applications using a
5+
Microsoft *Web Template Studio* (aka *WebTS*) is a Visual Studio Code Extension that accelerates the creation of new web applications using a
66
wizard-based experience. WebTS enables developers to generate boilerplate code for a web application
7-
by choosing between different front-end frameworks, back-end frameworks, pages and cloud services.
7+
by choosing between different frontend frameworks, backend frameworks, pages and cloud services.
88
The resulting web app is well-formed, readable code that incorporates cloud services on
99
Azure while implementing proven patterns and best practices. Sprinkled throughout the generated code we have links to
1010
Docs to provide useful insights. WebTS was created using TypeScript and React. Different combinations of generated code
@@ -17,33 +17,33 @@ are merged together by [Core Template Studio](https://github.com/Microsoft/CoreT
1717
| dev | [![Build Status](https://winappstudio.visualstudio.com/Vegas/_apis/build/status/WebTemplateStudio%20-%20CI%20and%20Deploy?branchName=dev)](https://winappstudio.visualstudio.com/Vegas/_build/latest?definitionId=158&branchName=dev) |
1818
| release | [![Build Status](https://winappstudio.visualstudio.com/Vegas/_apis/build/status/webTS/webts.staging.version.create?branchName=release)](https://winappstudio.visualstudio.com/Vegas/_build/latest?definitionId=161&branchName=release) |
1919

20-
# Documentation
20+
## Documentation
2121
Web Template Studio (WebTS) documentation is divided into three areas.
2222

2323

24-
## General
24+
### General
2525
Everyone should read these.
2626

2727
- [Installing the extension](/docs/install.md)
2828
- [Core Concepts](/docs/concepts.md)
2929

30-
## Using WebTS to build apps
30+
### Using WebTS to build apps
3131
These will help if using WebTS to build apps.
3232

33-
- [Front-end frameworks](docs/generated-apps/frontend-frameworks/readme.md)
34-
- [Back-end frameworks](docs/generated-apps/backend-frameworks/readme.md)
33+
- [Frontend frameworks](docs/generated-apps/frontend-frameworks/readme.md)
34+
- [Backend frameworks](docs/generated-apps/backend-frameworks/readme.md)
3535
- [Pages](docs/generated-apps/pages/readme.md)
3636
- [Services](docs/generated-apps/services/readme.md)
3737
- [Deployment of the generated apps](docs/generated-apps/deployment.md)
3838

3939

40-
## Working on WebTS
40+
### Working on WebTS
4141
These will help if you want to know more about WebTS or contribute to the project.
4242

4343
- [Application Arquitecture](docs/contributing/application-architecture.md)
4444
- [Getting started with the codebase](/docs/contributing/getting-started-developers.md)
45-
- [Templates](./contributing/templates.md)
46-
- [Accessibility](./contributing/accessibility.md)
45+
- [Templates](./docs/contributing/templates.md)
46+
- [Accessibility](./docs/contributing/accessibility.md)
4747

4848
## SHA256
4949

@@ -58,25 +58,25 @@ To verify the integrity of the package, download the vsix from the Marketplace,
5858
### Create a new project
5959

6060
- Open **VSCode**
61-
- Press `Ctrl + Shift + P` in Windows/Linux or `Shift ⇧ + Command ⌘ + P` in Mac to open VSCode's extension launcher
61+
- Press `Ctrl + Shift + P` in Windows/Linux or `Command ⌘ + Shift ⇧ + P` in Mac to open VSCode's extension launcher
6262
- Type/Select `Web Template Studio: Launch` and press `Enter` to launch the extension
6363

6464
### Deploy the generated project
6565

6666
- Open **VSCode**
6767
- Open the generated project
68-
- Press `Ctrl + Shift + P` in Windows/Linux or `Shift ⇧ + Command ⌘ + P` in Mac to open VSCode's extension launcher
68+
- Press `Ctrl + Shift + P` in Windows/Linux or `Command ⌘ + Shift ⇧ + P` in Mac to open VSCode's extension launcher
6969
- Type/Select `Web Template Studio: Deploy App` and press `Enter` to begin the deployment
7070

7171
## Example Scenario
7272

7373
I need a full-stack web app that is deployed on Azure App Service Web App.
7474

75-
![Readme-app-azure-screenshot](./docs/resources/readme-app-azure-screenshot.png)
75+
<img alt="App with Azure Services" src="./docs/resources/readme-app-azure-screenshot.png" width="95%" />
7676

7777
## Features
7878

79-
Web Template Studio approaches full-stack web app creation using the following three attribute sets:
79+
*Web Template Studio* approaches full-stack web app creation using the following three attribute sets:
8080

8181
- **Frameworks**: First, which frameworks do you want to use for your frontend and backend? We currently support three frameworks for frontend: _[React](https://reactjs.org/)_, _[Angular](https://angular.io/)_, _[Vue.js](https://vuejs.org/)_ and four frameworks for backend: _[Node](https://nodejs.org/en/)_, _[Flask](http://flask.pocoo.org/)_, _[Moleculer](https://moleculer.services/)_ and _[ASP.NET Core](https://dotnet.microsoft.com/apps/aspnet)_. We also provide a dependency checker to make sure you have the required version of Node, Python and/or .NET Core installed.
8282
- **App pages**: Next, to accelerate app creation, we provide a number of app page templates that you can use to add common UI pages into your new app. The current page templates include: _blank page_, common layouts (*e.g., master detail) and pages that implement common patterns (*e.g., grid, list). Using the wizard, add as many of the pages as you need, providing a name for each one, and we'll generate them for you.
@@ -126,4 +126,4 @@ The extension does [log basic telemetry](docs/telemetry.md) for what is being se
126126

127127
## Acknowledgments
128128

129-
Microsoft Web Template Studio was [initially created by Microsoft Garage interns](docs/acknowledgments.md). We hope many more continue with the project
129+
Microsoft *Web Template Studio* was [initially created by Microsoft Garage interns](docs/acknowledgments.md). We hope many more continue with the project.

_build/Extension-ReplaceNames.ps1

Lines changed: 92 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,134 @@
11
[CmdletBinding()]
22
Param(
3-
[Parameter(Mandatory=$True,Position=1)]
4-
[string]$vsixPackageJson,
3+
[Parameter(Mandatory = $True, Position = 1)]
4+
[string]$extensionPath,
55

6-
[Parameter(Mandatory=$True,Position=2)]
6+
[Parameter(Mandatory = $True, Position = 2)]
77
[string]$vsixName,
88

9-
[Parameter(Mandatory=$True,Position=3)]
9+
[Parameter(Mandatory = $True, Position = 3)]
1010
[string]$vsixDisplayName,
1111

12-
[Parameter(Mandatory=$True,Position=4)]
12+
[Parameter(Mandatory = $True, Position = 4)]
1313
[string]$versionNumber,
1414

15-
[Parameter(Mandatory=$True,Position=5)]
16-
[string]$aikey
15+
[Parameter(Mandatory = $True, Position = 5)]
16+
[string]$aikey,
17+
18+
[Parameter(Mandatory = $True, Position = 6)]
19+
[string]$commandCategory,
20+
21+
[Parameter(Mandatory = $True, Position = 7)]
22+
[string]$wizardLaunchCommand,
23+
24+
[Parameter(Mandatory = $True, Position = 8)]
25+
[string]$deployAppCommand
1726
)
1827
function Clear-WhiteSpace ($Text) {
1928
"$($Text -replace "(`t|`n|`r)"," " -replace "\s+"," ")".Trim()
2029
}
2130

2231
## SET NAME AND VERSION IN VSIX Package json
23-
if($vsixName){
24-
Write-Host
25-
Write-Host "Setting name and version in VSIX package json"
32+
if ($vsixName) {
33+
34+
$vsixPackageJson = Join-Path $extensionPath "package.json"
35+
$vsixPackageNlsJson = Join-Path $extensionPath "package.nls.json"
36+
$vsixPackagei18nJson = Join-Path $extensionPath "locales/en/package.i18n.json"
37+
$vsixExtensionTsFile = Join-Path $extensionPath "src/extension.ts"
38+
39+
# REPLACE Version, Name, DisplayName and commands IN package.json
40+
if (Test-Path($vsixPackageJson)) {
41+
42+
Write-Host
43+
Write-Host "Setting name,version and commands in VSIX package json"
2644

27-
if(Test-Path($vsixPackageJson)){
2845
$packagejsonContent = Get-Content $vsixPackageJson | ConvertFrom-Json
2946
$LocalIdentity = $packagejsonContent.name
3047
$localDisplayName = $packagejsonContent.displayName
3148
$localVersionNumber = $packagejsonContent.version
3249
$localAiKey = $packagejsonContent.aiKey
50+
$localwizardLaunchCommand = $packagejsonContent.contributes.commands[0].command
51+
$localdeployAppCommand = $packagejsonContent.contributes.commands[1].command
3352

3453
Write-Host "Replacing $LocalIdentity by $vsixName"
3554
Write-Host "Replacing $localDisplayName by $vsixDisplayName"
3655
Write-Host "Replacing $localVersionNumber by $versionNumber"
56+
Write-Host "Replacing $localwizardLaunchCommand by $wizardLaunchCommand"
57+
Write-Host "Replacing $localdeployAppCommand by $deployAppCommand"
3758

3859
$content = (Get-Content -path $vsixPackageJson -Raw)
3960

4061
$content = $content -replace "$LocalIdentity" , "$vsixName"
4162
$content = $content -replace [regex]::Escape("$localDisplayName") , "$vsixDisplayName"
4263
$content = $content -replace "$localVersionNumber" , "$versionNumber"
4364
$content = $content -replace "$localAiKey" , "$aikey"
65+
$content = $content -replace "$localwizardLaunchCommand" , "$wizardLaunchCommand"
66+
$content = $content -replace "$localdeployAppCommand" , "$deployAppCommand"
4467

4568
[System.IO.File]::WriteAllLines($vsixPackageJson, $content, [System.Text.UTF8Encoding]($False))
4669

47-
Write-Host "$resolvedPath - Version, Name & DisplayName applied ($versionNumber, $vsixName, $vsixDisplayName)"
70+
Write-Host "$resolvedPath - Version, Name, DisplayName and commands applied ($versionNumber, $vsixName, $vsixDisplayName, $wizardLaunchCommand, $deployAppCommand)"
4871
}
49-
else{
72+
else {
5073
throw "No VSIX package json file found."
5174
}
75+
76+
# REPLACE command category IN package.nls.json
77+
if (Test-Path($vsixPackageNlsJson)) {
78+
79+
$jsonFile = Get-Content $vsixPackageNlsJson | ConvertFrom-Json
80+
$localCommandCategory = $jsonFile.'webTemplateStudioExtension.commands.wts'
81+
Write-Host "Replacing $localCommandCategory command category by $commandCategory in package.nls.json"
82+
83+
$content = (Get-Content -path $vsixPackageNlsJson -Raw)
84+
$content = $content -replace [regex]::Escape("$localCommandCategory") , "$commandCategory"
85+
86+
[System.IO.File]::WriteAllLines($vsixPackageNlsJson, $content, [System.Text.UTF8Encoding]($False))
87+
Write-Host "$resolvedPath - category applied ($commandCategory)"
88+
}
89+
else {
90+
throw "No VSIX package.nls.json file found."
91+
}
92+
93+
# REPLACE command category IN package.i18n.json
94+
if (Test-Path($vsixPackagei18nJson)) {
95+
96+
$jsonFile = Get-Content $vsixPackagei18nJson | ConvertFrom-Json
97+
$localCommandCategory = $jsonFile.'webTemplateStudioExtension.commands.wts'
98+
Write-Host "Replacing $localCommandCategory command category by $commandCategory in package.i18n.json"
99+
100+
$content = (Get-Content -path $vsixPackagei18nJson -Raw)
101+
$content = $content -replace [regex]::Escape("$localCommandCategory") , "$commandCategory"
102+
103+
[System.IO.File]::WriteAllLines($vsixPackagei18nJson, $content, [System.Text.UTF8Encoding]($False))
104+
Write-Host "$resolvedPath - category applied ($commandCategory)"
105+
}
106+
else {
107+
throw "No VSIX package.i18n.json file found."
108+
}
109+
110+
# REPLACE commands IN extension.ts
111+
if (Test-Path($vsixExtensionTsFile)) {
112+
113+
$localWizardLaunchCommand = "webTemplateStudioExtension.wizardLaunch.local"
114+
$localdeployAppCommand = "webTemplateStudioExtension.deployApp.local"
115+
116+
Write-Host
117+
Write-Host "Replacing $localWizardLaunchCommand by $wizardLaunchCommand in extension.ts"
118+
Write-Host "Replacing $localdeployAppCommand by $deployAppCommand in extension.ts"
119+
120+
$content = (Get-Content -path $vsixExtensionTsFile -Raw)
121+
$content = $content -replace [regex]::Escape("$localWizardLaunchCommand") , "$wizardLaunchCommand"
122+
$content = $content -replace [regex]::Escape("$localdeployAppCommand") , "$deployAppCommand"
123+
124+
[System.IO.File]::WriteAllLines($vsixExtensionTsFile, $content, [System.Text.UTF8Encoding]($False))
125+
Write-Host "$resolvedPath - Commands applied ($localWizardLaunchCommand, $localdeployAppCommand)"
126+
}
127+
else {
128+
throw "No VSIX extension.ts file found."
129+
}
52130
}
53-
else{
131+
else {
54132
throw "Identity is mandatory."
55133
}
56134

_build/build-all.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ red='\033[0;31m'
77
nc='\033[0m'
88

99
# Build the client
10-
sh ./build-client.sh
10+
bash ./build-client.sh
1111

1212
# Build the cli in debug
13-
sh ./build-coretscli.sh "debug"
13+
bash ./build-coretscli.sh "debug"
1414

15-
# Build the extension
16-
sh ./build-extension.sh
15+
# Build the extension
16+
bash ./build-extension.sh

_build/build-coretscli-and-client.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ red='\033[0;31m'
77
nc='\033[0m'
88

99
# Build the client
10-
sh ./build-client.sh
10+
bash ./build-client.sh
1111

1212
# Build the cli in debug
13-
sh ./build-coretscli.sh "debug"
13+
bash ./build-coretscli.sh "debug"

docs/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Documentation
2-
Web Template Studio (WebTS) documentation is divided into three areas.
2+
*Web Template Studio* (WebTS) documentation is divided into three areas.
33

44

55
## General
@@ -11,17 +11,17 @@ Everyone should read these.
1111
## Using WebTS to build apps
1212
These will help if you are using WebTS to build apps.
1313

14-
- [Front-end frameworks](docs/generated-apps/frontend-frameworks/readme.md)
15-
- [Back-end frameworks](docs/generated-apps/backend-frameworks/readme.md)
16-
- [Pages](docs/generated-apps/pages/readme.md)
17-
- [Services](docs/generated-apps/services/readme.md)
18-
- [Deployment of the generated apps](docs/generated-apps/deployment.md)
14+
- [Frontend frameworks](/docs/generated-apps/frontend-frameworks)
15+
- [Backend frameworks](/docs/generated-apps/backend-frameworks)
16+
- [Pages](/docs/generated-apps/pages)
17+
- [Services](/docs/generated-apps/services)
18+
- [Deployment of the generated apps](/docs/generated-apps/deployment.md)
1919

2020

2121
## Working on WebTS
2222
These will help if you want to know more about WebTS or contribute to the project.
2323

24-
- [Application Arquitecture](docs/contributing/application-architecture.md)
24+
- [Application Arquitecture](/docs/contributing/application-architecture.md)
2525
- [Getting started with the codebase](/docs/contributing/getting-started-developers.md)
2626
- [Templates](./contributing/templates.md)
2727
- [Accessibility](./contributing/accessibility.md)

docs/acknowledgments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Acknowledgments
22

3-
Microsoft Web Template Studio was initially built by two great groups of interns from the Microsoft Garage. This full list of individuals that helped build the project.
3+
Microsoft *Web Template Studio* was initially built by two great groups of interns from the Microsoft Garage. This full list of individuals that helped build the project.
44

55
## First group (first quarter of 2019):
66

0 commit comments

Comments
 (0)