Skip to content

Commit 68ec0ac

Browse files
[All Hosts] (devx) simplified scripts in project templates (#4923)
* [All Hosts] (devx) simplified scripts in project templates * clarify * simplify * Update docs/excel/custom-functions-debugging.md Co-authored-by: Elizabeth Samuel <[email protected]> * Update docs/outlook/sideload-outlook-add-ins-for-testing.md Co-authored-by: Elizabeth Samuel <[email protected]> * Update docs/quickstarts/excel-custom-functions-quickstart.md Co-authored-by: Elizabeth Samuel <[email protected]> --------- Co-authored-by: Elizabeth Samuel <[email protected]>
1 parent 8b481f8 commit 68ec0ac

File tree

5 files changed

+7
-17
lines changed

5 files changed

+7
-17
lines changed

docs/develop/convert-xml-to-json-manifest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ You can sideload the add-in using the Teams Toolkit or in a command prompt, bash
108108

109109
1. First, *make sure Outlook desktop is closed.*
110110
1. Open a system prompt, bash shell, or the Visual Studio Code **TERMINAL**, and navigate to the root of the project.
111-
1. Run the command `npm run start:desktop`. The project builds and a Node dev-server window opens. This process may take a couple of minutes then Outlook desktop opens.
111+
1. If the "scripts" section of the project's package.json file has a "start:desktop" script, then run `npm run start:desktop`; otherwise, run `npm run start`. The project builds and a Node dev-server window opens. This process may take a couple of minutes then Outlook desktop opens.
112112
1. You can now work with your add-in.
113113
1. When you're done working with your add-in, make sure to run the command `npm run stop`.
114114

@@ -123,7 +123,7 @@ If the project was created with the Office Yeoman Generator and you don't want t
123123
```
124124
125125
1. Run `npm install`.
126-
1. To sideload the add-in, run `npm run start:desktop`. This command puts the unified manifest and the two image files into a zip file and sideloads it to the Office application. It also starts the server in a separate NodeJS window to host the add-in files on localhost.
126+
1. The command to sideload the add-in depends on when the project was created. If the "scripts" section of the project's package.json file has a "start:desktop" script, then run `npm run start:desktop`; otherwise, run `npm run start`. This command puts the unified manifest and the two image files into a zip file and sideloads it to the Office application. It also starts the server in a separate NodeJS window to host the add-in files on localhost.
127127
128128
When you're ready to stop the dev server and uninstall the add-in, run the command `npm run stop`.
129129

docs/excel/custom-functions-debugging.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ If you aren't using VS Code, you can use the command line (such as bash, or Powe
7070
1. From the command line run `npm run watch` to watch for and rebuild when code changes occur.
7171
1. Open a second command line window (the first one will be blocked while running the watch.)
7272

73-
1. If you want to start your add-in in the desktop version of Excel, run the following command.
74-
75-
`npm run start:desktop`
73+
1. If you want to start your add-in in the desktop version of Excel and the "scripts" section of the project's package.json file has a "start:desktop" script, then run `npm run start:desktop`; otherwise, run `npm run start`.
7674

7775
Or if you prefer to start your add-in in Excel on the web run the following command.
7876

@@ -99,7 +97,7 @@ There are several build tasks available.
9997

10098
You can use the following tasks to start debugging on desktop or online.
10199

102-
- `npm run start:desktop`: Starts Excel on desktop and sideloads your add-in.
100+
- `npm run start:desktop`: Starts Excel on desktop and sideloads your add-in. If the "start:desktop" script isn't present in the "scripts" section of the project's package.json file, then run `npm run start` instead.
103101
- `npm run start:web -- --document {url}` (where `{url}` is the URL of an Excel file on OneDrive or SharePoint): Starts Excel on the web and sideloads your add-in.
104102

105103
[!include[Mac command line note](../includes/mac-command-line.md)]

docs/outlook/sideload-outlook-add-ins-for-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The process to sideload an add-in that uses the unified app manifest for Microso
2020
- For add-in projects created using the [Teams Toolkit](/microsoftteams/platform/toolkit/install-teams-toolkit?tabs=vscode), use one of the following options.
2121
- [Sideload in Visual Studio Code with Teams Toolkit](../develop/convert-xml-to-json-manifest.md#sideload-with-the-teams-toolkit)
2222
- [Sideload in Visual Studio Code with a system prompt, bash shell, or terminal](../develop/convert-xml-to-json-manifest.md#sideload-with-a-system-prompt-bash-shell-or-terminal)
23-
- For add-in projects created using the [Yeoman generator for Office Add-ins](../develop/yeoman-generator-overview.md), in a command prompt, navigate to the root of your project. Then, run `npm run start:desktop`. The project builds and a Node dev-server window opens. This process may take a couple of minutes before it opens Outlook desktop.
23+
- For add-in projects created using the [Yeoman generator for Office Add-ins](../develop/yeoman-generator-overview.md), in a command prompt, navigate to the root of your project. Then, if there's a "start:desktop" script, run `npm run start:desktop`; otherwise, run `npm run start`. The project builds and a Node dev-server window opens. This process may take a couple of minutes before it opens Outlook desktop.
2424
- For NodeJS and npm projects that weren't created with the Yeoman generator, use one of the following options.
2525
- [Sideload with the Office-Addin-Debugging tool](../develop/convert-xml-to-json-manifest.md#sideload-with-the-office-addin-debugging-tool)
2626
- [Sideload with the Teams Toolkit CLI (command-line interface)](../develop/convert-xml-to-json-manifest.md#sideload-with-the-teams-toolkit-cli-command-line-interface)

docs/quickstarts/excel-custom-functions-quickstart.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ To test your add-in in Excel on the web, run the following command. When you run
5252
5353
# [Excel on Windows or Mac](#tab/excel-windows)
5454
55-
To test your add-in in Excel on Windows or Mac, run the following command. When you run this command, the local web server will start and Excel will open with your add-in loaded.
56-
57-
```command&nbsp;line
58-
npm run start:desktop
59-
```
55+
The command to test your add-in in Excel on Windows or Mac depends on when the project was created. If there's a "start:desktop" script in the "scripts" section of the package.json file, then run `npm run start:desktop`; otherwise, run `npm run start`. The local web server will start and Excel will open with your add-in loaded.
6056
6157
[!INCLUDE [alert use https](../includes/alert-use-https.md)]
6258

docs/tutorials/excel-tutorial-create-custom-functions.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ In this tutorial, you will:
5858
5959
# [Excel on Windows or Mac](#tab/excel-windows)
6060
61-
To test your add-in in Excel on Windows or Mac, run the following command. When you run this command, the local web server will start and Excel will open with your add-in loaded.
62-
63-
```command&nbsp;line
64-
npm run start:desktop
65-
```
61+
The command to test your add-in in Excel on Windows or Mac depends on when the project was created. If the "scripts" section of the project's package.json file has a "start:desktop" script, then run `npm run start:desktop`; otherwise, run the command `npm run start`. The local web server will start and Excel will open with your add-in loaded.
6662
6763
[!INCLUDE [alert use https](../includes/alert-use-https.md)]
6864

0 commit comments

Comments
 (0)