Skip to content

Commit

Permalink
Merge pull request #1683 from microsoft/dev
Browse files Browse the repository at this point in the history
Sync from dev
  • Loading branch information
prupipho committed Nov 18, 2020
2 parents 13db8e3 + 41621de commit 0ed54e2
Show file tree
Hide file tree
Showing 926 changed files with 9,140 additions and 12,231 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# At least one of the code owners below will be required on each PR:
* @sibille @mvegaca @dgomezc @trevorNgo @jcoc611-microsoft @piotrmark @MehaKaushik @Tanya0609 @javieraparisivaldes
* @sibille @mvegaca @dgomezc @trevorNgo @jcoc611-microsoft @piotrmark @MehaKaushik @Tanya0609 @prupipho

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ BenchmarkDotNet.Artifacts/
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json

# StyleCop
StyleCopReport.xml
Expand Down Expand Up @@ -369,3 +368,5 @@ src/extension/src/corets-cli/win32/

# Template tests
template_test/
src/client/src/translations/en.json
src/client/src/translations/whitelist_en.json
8 changes: 3 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Contributing to Web Template Studio

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

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

## Naming and styling conventions

All code that gets merged in must be formatted with [Prettier](https://prettier.io/). Also,
we use [TSLint](https://palantir.github.io/tslint/) to lint our TypeScript code and [ESLint](https://eslint.org/)
for JavaScript.
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.

## Documentation

Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<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>

Microsoft Web Template Studio (_WebTS_) is a Visual Studio Code Extension that accelerates the creation of new web applications using a
Microsoft *Web Template Studio* (aka *WebTS*) is a Visual Studio Code Extension that accelerates the creation of new web applications using a
wizard-based experience. WebTS enables developers to generate boilerplate code for a web application
by choosing between different front-end frameworks, back-end frameworks, pages and cloud services.
by choosing between different frontend frameworks, backend frameworks, pages and cloud services.
The resulting web app is well-formed, readable code that incorporates cloud services on
Azure while implementing proven patterns and best practices. Sprinkled throughout the generated code we have links to
Docs to provide useful insights. WebTS was created using TypeScript and React. Different combinations of generated code
Expand All @@ -17,33 +17,33 @@ are merged together by [Core Template Studio](https://github.com/Microsoft/CoreT
| 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) |
| 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) |

# Documentation
## Documentation
Web Template Studio (WebTS) documentation is divided into three areas.


## General
### General
Everyone should read these.

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

## Using WebTS to build apps
### Using WebTS to build apps
These will help if using WebTS to build apps.

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


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

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

## SHA256

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

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

### Deploy the generated project

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

## Example Scenario

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

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

## Features

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

- **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.
- **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.
Expand Down Expand Up @@ -126,4 +126,4 @@ The extension does [log basic telemetry](docs/telemetry.md) for what is being se

## Acknowledgments

Microsoft Web Template Studio was [initially created by Microsoft Garage interns](docs/acknowledgments.md). We hope many more continue with the project
Microsoft *Web Template Studio* was [initially created by Microsoft Garage interns](docs/acknowledgments.md). We hope many more continue with the project.
106 changes: 92 additions & 14 deletions _build/Extension-ReplaceNames.ps1
Original file line number Diff line number Diff line change
@@ -1,56 +1,134 @@
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1)]
[string]$vsixPackageJson,
[Parameter(Mandatory = $True, Position = 1)]
[string]$extensionPath,

[Parameter(Mandatory=$True,Position=2)]
[Parameter(Mandatory = $True, Position = 2)]
[string]$vsixName,

[Parameter(Mandatory=$True,Position=3)]
[Parameter(Mandatory = $True, Position = 3)]
[string]$vsixDisplayName,

[Parameter(Mandatory=$True,Position=4)]
[Parameter(Mandatory = $True, Position = 4)]
[string]$versionNumber,

[Parameter(Mandatory=$True,Position=5)]
[string]$aikey
[Parameter(Mandatory = $True, Position = 5)]
[string]$aikey,

[Parameter(Mandatory = $True, Position = 6)]
[string]$commandCategory,

[Parameter(Mandatory = $True, Position = 7)]
[string]$wizardLaunchCommand,

[Parameter(Mandatory = $True, Position = 8)]
[string]$deployAppCommand
)
function Clear-WhiteSpace ($Text) {
"$($Text -replace "(`t|`n|`r)"," " -replace "\s+"," ")".Trim()
}

## SET NAME AND VERSION IN VSIX Package json
if($vsixName){
Write-Host
Write-Host "Setting name and version in VSIX package json"
if ($vsixName) {

$vsixPackageJson = Join-Path $extensionPath "package.json"
$vsixPackageNlsJson = Join-Path $extensionPath "package.nls.json"
$vsixPackagei18nJson = Join-Path $extensionPath "locales/en/package.i18n.json"
$vsixExtensionTsFile = Join-Path $extensionPath "src/extension.ts"

# REPLACE Version, Name, DisplayName and commands IN package.json
if (Test-Path($vsixPackageJson)) {

Write-Host
Write-Host "Setting name,version and commands in VSIX package json"

if(Test-Path($vsixPackageJson)){
$packagejsonContent = Get-Content $vsixPackageJson | ConvertFrom-Json
$LocalIdentity = $packagejsonContent.name
$localDisplayName = $packagejsonContent.displayName
$localVersionNumber = $packagejsonContent.version
$localAiKey = $packagejsonContent.aiKey
$localwizardLaunchCommand = $packagejsonContent.contributes.commands[0].command
$localdeployAppCommand = $packagejsonContent.contributes.commands[1].command

Write-Host "Replacing $LocalIdentity by $vsixName"
Write-Host "Replacing $localDisplayName by $vsixDisplayName"
Write-Host "Replacing $localVersionNumber by $versionNumber"
Write-Host "Replacing $localwizardLaunchCommand by $wizardLaunchCommand"
Write-Host "Replacing $localdeployAppCommand by $deployAppCommand"

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

$content = $content -replace "$LocalIdentity" , "$vsixName"
$content = $content -replace [regex]::Escape("$localDisplayName") , "$vsixDisplayName"
$content = $content -replace "$localVersionNumber" , "$versionNumber"
$content = $content -replace "$localAiKey" , "$aikey"
$content = $content -replace "$localwizardLaunchCommand" , "$wizardLaunchCommand"
$content = $content -replace "$localdeployAppCommand" , "$deployAppCommand"

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

Write-Host "$resolvedPath - Version, Name & DisplayName applied ($versionNumber, $vsixName, $vsixDisplayName)"
Write-Host "$resolvedPath - Version, Name, DisplayName and commands applied ($versionNumber, $vsixName, $vsixDisplayName, $wizardLaunchCommand, $deployAppCommand)"
}
else{
else {
throw "No VSIX package json file found."
}

# REPLACE command category IN package.nls.json
if (Test-Path($vsixPackageNlsJson)) {

$jsonFile = Get-Content $vsixPackageNlsJson | ConvertFrom-Json
$localCommandCategory = $jsonFile.'webTemplateStudioExtension.commands.wts'
Write-Host "Replacing $localCommandCategory command category by $commandCategory in package.nls.json"

$content = (Get-Content -path $vsixPackageNlsJson -Raw)
$content = $content -replace [regex]::Escape("$localCommandCategory") , "$commandCategory"

[System.IO.File]::WriteAllLines($vsixPackageNlsJson, $content, [System.Text.UTF8Encoding]($False))
Write-Host "$resolvedPath - category applied ($commandCategory)"
}
else {
throw "No VSIX package.nls.json file found."
}

# REPLACE command category IN package.i18n.json
if (Test-Path($vsixPackagei18nJson)) {

$jsonFile = Get-Content $vsixPackagei18nJson | ConvertFrom-Json
$localCommandCategory = $jsonFile.'webTemplateStudioExtension.commands.wts'
Write-Host "Replacing $localCommandCategory command category by $commandCategory in package.i18n.json"

$content = (Get-Content -path $vsixPackagei18nJson -Raw)
$content = $content -replace [regex]::Escape("$localCommandCategory") , "$commandCategory"

[System.IO.File]::WriteAllLines($vsixPackagei18nJson, $content, [System.Text.UTF8Encoding]($False))
Write-Host "$resolvedPath - category applied ($commandCategory)"
}
else {
throw "No VSIX package.i18n.json file found."
}

# REPLACE commands IN extension.ts
if (Test-Path($vsixExtensionTsFile)) {

$localWizardLaunchCommand = "webTemplateStudioExtension.wizardLaunch.local"
$localdeployAppCommand = "webTemplateStudioExtension.deployApp.local"

Write-Host
Write-Host "Replacing $localWizardLaunchCommand by $wizardLaunchCommand in extension.ts"
Write-Host "Replacing $localdeployAppCommand by $deployAppCommand in extension.ts"

$content = (Get-Content -path $vsixExtensionTsFile -Raw)
$content = $content -replace [regex]::Escape("$localWizardLaunchCommand") , "$wizardLaunchCommand"
$content = $content -replace [regex]::Escape("$localdeployAppCommand") , "$deployAppCommand"

[System.IO.File]::WriteAllLines($vsixExtensionTsFile, $content, [System.Text.UTF8Encoding]($False))
Write-Host "$resolvedPath - Commands applied ($localWizardLaunchCommand, $localdeployAppCommand)"
}
else {
throw "No VSIX extension.ts file found."
}
}
else{
else {
throw "Identity is mandatory."
}

8 changes: 4 additions & 4 deletions _build/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ red='\033[0;31m'
nc='\033[0m'

# Build the client
sh ./build-client.sh
bash ./build-client.sh

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

# Build the extension
sh ./build-extension.sh
# Build the extension
bash ./build-extension.sh
4 changes: 2 additions & 2 deletions _build/build-coretscli-and-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ red='\033[0;31m'
nc='\033[0m'

# Build the client
sh ./build-client.sh
bash ./build-client.sh

# Build the cli in debug
sh ./build-coretscli.sh "debug"
bash ./build-coretscli.sh "debug"
14 changes: 7 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Documentation
Web Template Studio (WebTS) documentation is divided into three areas.
*Web Template Studio* (WebTS) documentation is divided into three areas.


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

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


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

- [Application Arquitecture](docs/contributing/application-architecture.md)
- [Application Arquitecture](/docs/contributing/application-architecture.md)
- [Getting started with the codebase](/docs/contributing/getting-started-developers.md)
- [Templates](./contributing/templates.md)
- [Accessibility](./contributing/accessibility.md)
2 changes: 1 addition & 1 deletion docs/acknowledgments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Acknowledgments

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.
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.

## First group (first quarter of 2019):

Expand Down
Loading

0 comments on commit 0ed54e2

Please sign in to comment.