build(docs-infra): ensure that terminal code snippets render correctly (#41986)

After the changes to the `lang-none` styling in #41335, code snippets marked with

```
language="none" class="code-shell"
```

were being styled with the same foreground and background colours.

It turns out that most of these ought to be marked `language="sh"`
in which case the `code-shell` style became redundant and has been
removed.

Fixes #41984

PR Close #41986
This commit is contained in:
Pete Bacon Darwin
2021-05-07 11:28:39 +01:00
committed by Alex Rickabaugh
parent 4bc3cf216d
commit 3a48c0739d
30 changed files with 104 additions and 109 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ To create a new workspace and an initial app project:
1. Ensure that you are not already in an Angular workspace folder. For example, if you have previously created the Getting Started workspace, change to the parent of that folder.
2. Run the CLI command `ng new` and provide the name `angular-tour-of-heroes`, as shown here:
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng new angular-tour-of-heroes
</code-example>
@@ -50,7 +50,7 @@ The initial app project contains a simple Welcome app, ready to run.
Go to the workspace directory and launch the application.
<code-example language="sh" class="code-shell">
<code-example language="sh">
cd angular-tour-of-heroes
ng serve --open
</code-example>
+2 -2
View File
@@ -14,7 +14,7 @@ and place that component in the application shell.
Using the Angular CLI, generate a new component named `heroes`.
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng generate component heroes
</code-example>
@@ -146,7 +146,7 @@ Notice that the app stopped working when you added `[(ngModel)]`.
To see the error, open the browser development tools and look in the console
for a message like
<code-example language="sh" class="code-shell">
<code-example language="sh">
Template parse errors:
Can't bind to 'ngModel' since it isn't a known property of 'input'.
</code-example>
+1 -1
View File
@@ -153,7 +153,7 @@ After the browser refreshes, the application is broken.
Open the browser developer tools and look in the console for an error message like this:
<code-example language="sh" class="code-shell">
<code-example language="sh">
HeroesComponent.html:3 ERROR TypeError: Cannot read property 'name' of undefined
</code-example>
+1 -1
View File
@@ -20,7 +20,7 @@ The `HeroDetailComponent` will present details of a selected hero.
Use the Angular CLI to generate a new component named `hero-detail`.
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng generate component hero-detail
</code-example>
+3 -3
View File
@@ -34,7 +34,7 @@ when the user clicks a hero.
Using the Angular CLI, create a service called `hero`.
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng generate service hero
</code-example>
@@ -265,7 +265,7 @@ This section guides you through the following:
Use the CLI to create the `MessagesComponent`.
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng generate component messages
</code-example>
@@ -284,7 +284,7 @@ You should see the default paragraph from `MessagesComponent` at the bottom of t
Use the CLI to create the `MessageService` in `src/app`.
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng generate service message
</code-example>
+3 -3
View File
@@ -28,7 +28,7 @@ By convention, the module class name is `AppRoutingModule` and it belongs in the
Use the CLI to generate it.
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng generate module app-routing --flat --module=app
</code-example>
@@ -120,7 +120,7 @@ because `AppModule` imports `AppRoutingModule` which exported `RouterModule`. Th
You should still be running with this CLI command.
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng serve
</code-example>
@@ -174,7 +174,7 @@ So far there's only the heroes view.
Add a `DashboardComponent` using the CLI:
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng generate component dashboard
</code-example>
+3 -3
View File
@@ -50,7 +50,7 @@ If you're coding along with this tutorial, stay here and add the In-memory Web A
Install the In-memory Web API package from npm with the following command:
<code-example language="sh" class="code-shell">
<code-example language="sh">
npm install angular-in-memory-web-api --save
</code-example>
@@ -71,7 +71,7 @@ that primes the in-memory database.
Generate the class `src/app/in-memory-data.service.ts` with the following command:
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng generate service InMemoryData
</code-example>
@@ -406,7 +406,7 @@ For this to work, the next step is to add a component with a selector that match
Create a `HeroSearchComponent` with the CLI.
<code-example language="sh" class="code-shell">
<code-example language="sh">
ng generate component hero-search
</code-example>