Skip to content

Commit 0a39da6

Browse files
waldekmastykarzVesaJuvonen
authored andcommitted
Added npm shrinkwrap to all tutorials (SharePoint#960)
1 parent caa35d7 commit 0a39da6

22 files changed

+155
-29
lines changed

docs/spfx/extensions/get-started/build-a-hello-world-extension.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ This article describes how to create your first Hello World SharePoint Framework
5454
5555
For information about troubleshooting any errors, see [Known issues](../../known-issues-and-common-questions.md).
5656
57-
6. When the solution scaffolding is complete, type the following into the console to start Visual Studio Code.
57+
6. Once the scaffolding completes, lock down the version of the project dependencies by running the following command:
58+
59+
```sh
60+
npm shrinkwrap
61+
```
62+
63+
7. Next, type the following into the console to start Visual Studio Code.
5864
5965
```
6066
code .
@@ -66,7 +72,7 @@ This article describes how to create your first Hello World SharePoint Framework
6672
6773
![SharePoint Framework solution opened after initial scaffolding](../../../images/ext-app-vscode-solution-structure.png)
6874
69-
7. Open **HelloWorldApplicationCustomizer.manifest.json** in the src\extensions\helloWorld folder.
75+
8. Open **HelloWorldApplicationCustomizer.manifest.json** in the src\extensions\helloWorld folder.
7076
7177
This file defines your extension type and a unique identifier for your extension. You’ll need this ID later when you debug and deploy your extension to SharePoint.
7278

docs/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ This article describes how to create your first ListView Command Set Extension.
5252
5353
For information about troubleshooting any errors, see [Known issues](../../known-issues-and-common-questions.md).
5454
55-
6. When the solution scaffolding is complete, type the following into the console to start Visual Studio Code.
55+
6. Once the scaffolding completes, lock down the version of the project dependencies by running the following command:
56+
57+
```sh
58+
npm shrinkwrap
59+
```
60+
61+
7. Next, type the following into the console to start Visual Studio Code.
5662
5763
```
5864
code .
@@ -64,7 +70,7 @@ This article describes how to create your first ListView Command Set Extension.
6470
6571
![SharePoint Framework solution opened after initial scaffolding](../../../images/ext-com-vscode-solution-structure.png)
6672
67-
7. Open **HelloWorldCommandSet.manifest.json** in the **src\extensions\helloWorld** folder.
73+
8. Open **HelloWorldCommandSet.manifest.json** in the **src\extensions\helloWorld** folder.
6874
6975
This file defines your extension type and a unique identifier `id` for your extension. You’ll need this unique identifier later when debugging and deploying your extension to SharePoint.
7076

docs/spfx/extensions/get-started/building-simple-field-customizer.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@ This article describes how to create your first Field Customizer Extension. You
5252
![SharePoint client-side solution scaffolded successfully](../../../images/ext-field-yeoman-complete.png)
5353
5454
For information about troubleshooting any errors, see [Known issues](../../known-issues-and-common-questions.md).
55+
56+
6. Once the scaffolding completes, lock down the version of the project dependencies by running the following command:
57+
58+
```sh
59+
npm shrinkwrap
60+
```
5561
56-
6. When the solution scaffolding is complete, type the following into the console to start Visual Studio Code.
62+
7. Next, type the following into the console to start Visual Studio Code.
5763
5864
```
5965
code .
@@ -65,7 +71,7 @@ This article describes how to create your first Field Customizer Extension. You
6571
6672
![SharePoint Framework solution opened after initial scaffolding](../../../images/ext-field-vscode-solution-structure.png)
6773
68-
7. Open **HelloWorldFieldCustomizer.manifest.json** in the **src\extensions\helloWorld** folder.
74+
8. Open **HelloWorldFieldCustomizer.manifest.json** in the **src\extensions\helloWorld** folder.
6975
7076
This file defines your extension type and a unique identifier `id` for your extension. You’ll need this unique identifier later when debugging and deploying your extension to SharePoint.
7177

docs/spfx/extensions/guidance/using-custom-dialogs-with-spfx.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,21 @@ The next set of prompts will ask for specific information about your extension:
5252
5353
![Yeoman SharePoint generator prompts to create an extension solution](../../../images/ext-com-dialog-yeoman-prompts.png)
5454
55-
At this point, Yeoman will install the required dependencies and scaffold the solution files along with the *DialogDemo* extension. This might take a few minutes.
55+
At this point, Yeoman will install the required dependencies and scaffold the solution files along with the *DialogDemo* extension. This might take a few minutes.
5656
5757
When the scaffold is complete, you should see the following message indicating a successful scaffold:
5858
5959
![SharePoint client-side solution scaffolded successfully](../../../images/ext-com-dialog-yeoman-complete.png)
6060
6161
>**Note:** For information about troubleshooting any errors, see [Known issues](../../known-issues-and-common-questions.md).
6262
63-
When the scaffolding is complete, open your project folder in your code editor. This article uses Visual Studio Code in the steps and screenshots, but you can use any editor you prefer. To open the folder in Visual Studio Code, use the following command in the console:
63+
Once the scaffolding completes, lock down the version of the project dependencies by running the following command:
64+
65+
```sh
66+
npm shrinkwrap
67+
```
68+
69+
Next, open your project folder in your code editor. This article uses Visual Studio Code in the steps and screenshots, but you can use any editor you prefer. To open the folder in Visual Studio Code, use the following command in the console:
6470
6571
```sh
6672
code .

docs/spfx/web-parts/get-started/add-jqueryui-accordion-to-web-part.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ The next set of prompts will ask for specific information about your web part:
6767

6868
At this point, Yeoman will install the required dependencies and scaffold the solution files. This might take a few minutes. Yeoman will scaffold the project to include your **jQueryWebPart** web part as well.
6969

70-
In the console, type the following to open the web part project in Visual Studio Code:
70+
Once the scaffolding completes, lock down the version of the project dependencies by running the following command:
71+
72+
```sh
73+
npm shrinkwrap
74+
```
75+
76+
Next, type the following to open the web part project in Visual Studio Code:
7177

7278
```
7379
code .

docs/spfx/web-parts/get-started/build-a-hello-world-web-part.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The next set of prompts will ask for specific information about your web part:
5858

5959
![Yeoman SharePoint generator prompts to create a web part client-side solution](../../../images/yeoman-sp-prompts.png)
6060

61-
At this point, Yeoman will install the required dependencies and scaffold the solution files along with the **HelloWorld** web part. This might take a few minutes.
61+
At this point, Yeoman will install the required dependencies and scaffold the solution files along with the **HelloWorld** web part. This might take a few minutes.
6262

6363
When the scaffold is complete, you should see the following message indicating a successful scaffold:
6464

@@ -73,7 +73,7 @@ Because the SharePoint client-side solution is HTML/TypeScript based, you can us
7373
* [Atom](https://atom.io)
7474
* [Webstorm](https://www.jetbrains.com/webstorm)
7575

76-
SharePoint Framework documentation uses Visual Studio code in the steps and examples. Visual Studio Code is a lightweight but powerful source code editor from Microsoft which runs on your desktop and is available for Windows, Mac and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Python, PHP) and runtimes..
76+
SharePoint Framework documentation uses Visual Studio code in the steps and examples. Visual Studio Code is a lightweight but powerful source code editor from Microsoft which runs on your desktop and is available for Windows, Mac and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Python, PHP) and runtimes.
7777

7878
## Preview the web part
7979
To preview your web part, build and run it on a local web server. The client-side toolchain uses HTTPS endpoint by default. However, since a default certificate is not configured for the local dev environment, your browser will report a certificate error. The SPFx toolchain comes with a developer certificate that you can install for building web parts.

docs/spfx/web-parts/get-started/hosting-webpart-from-office-365-cdn.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,14 @@ When prompted:
8282
![Yeoman generator questions around the newly created web part](../../../images/cdn-create-webpart-yo.png)
8383

8484
At this point, Yeoman will scaffold the solution files and install the required dependencies. This might take a few minutes. Yeoman will scaffold the project to include your custom web part as well.
85-
86-
When the scaffold is complete, in the console, type the following to open the web part project in Visual Studio Code:
85+
86+
Once the scaffolding completes, lock down the version of the project dependencies by running the following command:
87+
88+
```sh
89+
npm shrinkwrap
90+
```
91+
92+
Next, type the following to open the web part project in Visual Studio Code:
8793

8894
```
8995
code .

docs/spfx/web-parts/get-started/provision-sp-assets-from-package.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ The next set of prompts will ask for specific information about your web part:
5454

5555
At this point, Yeoman will install the required dependencies and scaffold the solution files. This might take a few minutes. Yeoman will scaffold the project to include your **AssetDeployment** web part as well.
5656

57-
In the console, type the following to open the web part project in Visual Studio Code:
57+
Once the scaffolding completes, lock down the version of the project dependencies by running the following command:
58+
59+
```sh
60+
npm shrinkwrap
61+
```
62+
63+
Next, type the following to open the web part project in Visual Studio Code:
5864

5965
```
6066
code .

docs/spfx/web-parts/get-started/use-fabric-react-components.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@ The next set of prompts will ask for specific information about your web part:
5959
* Select **React** as the framework and choose **Enter**.
6060

6161
At this point, Yeoman will install the required dependencies and scaffold the solution files. This might take a few minutes. Yeoman will scaffold the project to include your DocumentCardExample web part as well.
62-
63-
When the scaffold is complete, in the console, type the following to open the web part project in Visual Studio Code:
62+
63+
Once the scaffolding completes, lock down the version of the project dependencies by running the following command:
64+
65+
```sh
66+
npm shrinkwrap
67+
```
68+
69+
Next, type the following to open the web part project in Visual Studio Code:
6470

6571
```
6672
code .

docs/spfx/web-parts/guidance/build-client-side-web-parts-with-angular-1-x.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@ When prompted, define values as follows:
4444

4545
![SharePoint Framework Yeoman generator with the default choices](../../../images/ng-intro-yeoman-generator.png)
4646

47-
Once the scaffolding completes, open your project folder in your code editor. In this tutorial, you will use Visual Studio Code.
47+
Once the scaffolding completes, lock down the version of the project dependencies by running the following command:
48+
49+
```sh
50+
npm shrinkwrap
51+
```
52+
53+
Next, open your project folder in your code editor. In this tutorial, you will use Visual Studio Code.
4854

4955
![SharePoint Framework project open in Visual Studio Code](../../../images/ng-intro-project-visual-studio-code.png)
5056

0 commit comments

Comments
 (0)