Skip to content

Commit 346c0a1

Browse files
committed
Removes Asciinema players with custom CommandPlayer. Closes #7130
1 parent f508e03 commit 346c0a1

19 files changed

+1198
-609
lines changed

docs/docs/index.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
import AsciinemaPlayer from '@site/src/components/AsciinemaPlayer';
2-
import 'asciinema-player/dist/bundle/asciinema-player.css';
1+
import CommandPlayer from '../src/components/CommandPlayer';
32

43
# CLI for Microsoft 365
54

65
Using the CLI for Microsoft 365, you can manage your Microsoft 365 tenant and SharePoint Framework projects on any platform. No matter if you are on Windows, macOS or Linux, using Bash, Cmder or PowerShell, using the CLI for Microsoft 365 you can configure Microsoft 365, manage SharePoint Framework projects and build automation scripts.
76

8-
<AsciinemaPlayer src="/casts/home.cast" rows={15} idleTimeLimit={3} preload={true} loop autoplay/>
7+
<CommandPlayer commands={[
8+
{ command: "m365 login", response: "To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code RB2RUD56D to authenticate." },
9+
{ command: "m365 status", responseFrom: "./cmd/status.mdx" },
10+
{ command: "m365 tenant serviceannouncement health list", responseFrom: "./cmd/tenant/serviceannouncement/serviceannouncement-health-list.mdx" },
11+
{ command: "m365 entra user list", responseFrom: "./cmd/entra/user/user-list.mdx" },
12+
{ command: "m365 todo task add --title \"New task\" --listName \"Tasks\"", responseFrom: "./cmd/todo/task/task-add.mdx" }
13+
]} />
914

1015
## Installation
1116

docs/docs/user-guide/connecting-microsoft-365.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ title: Log in to Microsoft 365
33
sidebar_position: 3
44
---
55

6-
import AsciinemaPlayer from '@site/src/components/AsciinemaPlayer';
7-
import 'asciinema-player/dist/bundle/asciinema-player.css';
6+
import CommandPlayer from '../../src/components/CommandPlayer';
87

98
# Log in to Microsoft 365
109

@@ -188,7 +187,7 @@ If you're logged in to Microsoft 365 using a certificate, the `status` command w
188187

189188
To log out from Microsoft 365, use the `logout` command. Executing the `logout` command removes all connection information such as user name, refresh or access tokens stored on your computer.
190189

191-
<AsciinemaPlayer src="/casts/logout.cast" rows={15} idleTimeLimit={3} preload={true} loop autoplay/>
190+
<CommandPlayer command="m365 logout" response='Logged out from Microsoft 365' />
192191

193192
### Working with SharePoint Online
194193

docs/docs/user-guide/installing-cli.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Install the CLI
33
sidebar_position: 1
44
---
55

6-
import AsciinemaPlayer from '@site/src/components/AsciinemaPlayer';
7-
import 'asciinema-player/dist/bundle/asciinema-player.css';
86

97
# Install the CLI for Microsoft 365
108

@@ -26,10 +24,6 @@ To install the CLI for Microsoft 365, in the command line execute:
2624
npm install -g @pnp/cli-microsoft365
2725
```
2826

29-
<AsciinemaPlayer src="/casts/install.cast" rows={15} idleTimeLimit={3} preload={true} loop autoplay/>
30-
31-
<br />
32-
3327
If you're using Yarn, you can install the CLI for Microsoft 365 by executing:
3428

3529
```sh

docs/docs/user-guide/using-cli.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ title: Use the CLI
33
sidebar_position: 2
44
---
55

6-
import AsciinemaPlayer from '@site/src/components/AsciinemaPlayer';
7-
import 'asciinema-player/dist/bundle/asciinema-player.css';
6+
import CommandPlayer from '../../src/components/CommandPlayer';
87

98
# Use the CLI for Microsoft 365
109

@@ -14,7 +13,7 @@ Information in this section will help you understand how the CLI for Microsoft 3
1413

1514
To use CLI for Microsoft 365, execute specific commands directly from the command line.
1615

17-
<AsciinemaPlayer src="/casts/usingCli.cast" rows={20} idleTimeLimit={3} preload={true} loop autoplay/>
16+
<CommandPlayer command="m365 spo site list --type TeamSite" responseFrom="../cmd/spo/site/site-list.mdx" />
1817

1918
<br/>
2019

@@ -32,15 +31,15 @@ To list commands available with the CLI for Microsoft 365 type `help` in the CLI
3231

3332
Commands in the CLI for Microsoft 365 are combined into groups. You can list the commands available in the particular group by typing `help <group>`, for example `help spo` to list all commands related to SharePoint Online, or `m365 help spo` directly in your shell.
3433

35-
<AsciinemaPlayer src="/casts/listCommands.cast" rows={20} idleTimeLimit={3} preload={true} loop autoplay/>
34+
<CommandPlayer command="m365 help spo" responseFrom="../../src/components/responses/help-spo.txt" />
3635

3736
## Get command help
3837

3938
Each command in the CLI for Microsoft 365 comes with help describing the command's purpose, available options and any other relevant details as well as related resources. To get the basic help information with command's description and available options, type `help <command>` or `m365 help <command>` in the shell, for example to get help for the `spo cdn get` command, type in the shell `m365 help spo cdn get`.
4039

4140
To get the complete help information including background information, examples and links to related information, use the `--help` option, for example `m365 spo cdn get --help`. This ability is also useful if you've already typed some options and don't want to lose your input but want to access the help, for example: `m365 spo cdn get --type Private --help`.
4241

43-
<AsciinemaPlayer src="/casts/commandHelp.cast" rows={20} idleTimeLimit={3} preload={true} loop autoplay/>
42+
<CommandPlayer command="m365 spo cdn get --help" responseFrom="../../src/components/responses/spo-cdn-get-help.txt" />
4443

4544
## Required and optional command options
4645

docs/docusaurus.config.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { Options as ClientRedirectsOptions } from '@docusaurus/plugin-clien
44
import LightCodeTheme from './src/config/lightCodeTheme';
55
import DarkCodeTheme from './src/config/darkCodeTheme';
66
import definitionList from './src/remark/definitionLists';
7+
import commandPlayer from './src/remark/commandPlayer';
78

89
const config: Config = {
910
title: 'CLI for Microsoft 365',
@@ -18,6 +19,14 @@ const config: Config = {
1819
organizationName: 'pnp',
1920
projectName: 'cli-microsoft365',
2021

22+
headTags: [
23+
{
24+
tagName: 'script',
25+
attributes: { type: 'text/javascript' },
26+
innerHTML: 'window.gtag=window.gtag||function(){(window.dataLayer=window.dataLayer||[]).push(arguments)};'
27+
}
28+
],
29+
2130
i18n: {
2231
defaultLocale: 'en',
2332
locales: ['en']
@@ -70,11 +79,11 @@ const config: Config = {
7079
sidebarPath: './src/config/sidebars.ts',
7180
editUrl: 'https://github.com/pnp/cli-microsoft365/blob/main/docs',
7281
showLastUpdateTime: true,
73-
remarkPlugins: [definitionList]
82+
remarkPlugins: [definitionList, commandPlayer]
7483
},
7584
blog: false,
7685
theme: {
77-
customCss: ['./src/scss/Global.module.scss']
86+
customCss: ['./src/scss/Global.module.scss', './src/scss/CommandPlayer.module.scss']
7887
},
7988
gtag: {
8089
trackingID: 'G-DH3T88LK5K',

docs/package-lock.json

Lines changed: 8 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"devDependencies": {
3434
"@docusaurus/module-type-aliases": "^3.9.2",
3535
"@docusaurus/tsconfig": "^3.9.2",
36-
"asciinema-player": "^3.15.1",
36+
"baseline-browser-mapping": "^2.10.8",
3737
"typescript": "^5.9.3"
3838
},
3939
"browserslist": {

docs/src/components/AsciinemaPlayer.tsx

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)