You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 15, 2025. It is now read-only.
*[Publishing npm packages to the registry](https://github.com/Microsoft/nodejs-guidelines/blob/master/README.md#publishing-npm-packages-to-the-registry)
34
34
*[Local vs. Global packages](https://github.com/Microsoft/nodejs-guidelines/blob/master/README.md#local-vs-global-packages)
35
-
*[Configuring and Customizing your Windows development environment](https://github.com/Microsoft/nodejs-guidelines/blob/master/README.md#configuring-and-customizing-your-windows-development-environment)
35
+
*[Configuring your Windows development environment](https://github.com/Microsoft/nodejs-guidelines/blob/master/README.md#configuring-your-windows-development-environment)
36
36
*[Command-line console recommendations and other tools](https://github.com/Microsoft/nodejs-guidelines/blob/master/README.md#command-line-console-and-other-useful-tools)
37
37
*[Editors and IDEs](https://github.com/Microsoft/nodejs-guidelines/blob/master/README.md#editors-and-ides)
38
38
*[MAX_PATH explanation and workarounds](https://github.com/Microsoft/nodejs-guidelines/blob/master/README.md#max_path-explanation-and-workarounds)
@@ -124,7 +124,7 @@ To get a sense for how to use npm packages in your app, let's try getting starte
124
124
125
125
There are many more packages available at your disposal (200K and counting!). Head on over to https://www.npmjs.com to start exploring the ecosystem.
126
126
127
-
> :bulb: Most of the packages available via npm tend to be pure javascript, but not all of them. For instance, there's a small percentage of native module addons available via npm that provide Node.js bindings, but ultimately call into native C++ code. This includes packages with `node-gyp`, `node-pre-gyp`, and `nan` dependencies. In order to install and run these packages, some additional machine configuration is required (described below).
127
+
> :bulb: Most of the packages available via npm tend to be pure JavaScript, but not all of them. For instance, there's a small percentage of native module addons available via npm that provide Node.js bindings, but ultimately call into native C++ code. This includes packages with `node-gyp`, `node-pre-gyp`, and `nan` dependencies. In order to install and run these packages, some additional machine configuration is required (described below).
128
128
129
129
### Managing npm dependencies
130
130
Once you start installing npm packages, you'll need a way to keep track of all of your dependencies. In Node.js, you do this through a `package.json` file.
@@ -136,11 +136,11 @@ Once you start installing npm packages, you'll need a way to keep track of all o
136
136
137
137
2. Npm will prompt you to fill in the details about your package.
138
138
3. In the `package.json` file, there is a "dependencies" section, and within it, an entry for `"express"`. A value of `"*"` would mean that the latest version should be used. To add this entry automatically when you install a package, you can add a `--save` flag: `npm install express --save`.
139
-
> :bulb:if you only require a dependency as part of a development environment, then you could/should install the package in the "devDependencies". This is accomplished by using the `--save-dev` parameter: `npm install --save-dev mocha`
139
+
> :bulb:If you only require a dependency as part of a development environment, then you could/should install the package in the "devDependencies". This is accomplished by using the `--save-dev` parameter. For example: `npm install --save-dev mocha`.
140
140
141
-
4. Now that your packages are listed in package.json, npm will always know which dependencies are required for your app. If you ever need to restore your packages, you can run `npm install` from your package directory.
141
+
4. Now that your packages are listed in `package.json`, npm will always know which dependencies are required for your app. If you ever need to restore your packages, you can run `npm install` from your package directory.
142
142
143
-
> :bulb: When you distribute your application, we recommend adding the `node_modules` folder to `.gitignore` so that you don't clutter your repo with needless files. This also makes it easier to work with multiple platforms that. If you want to keep things as similar as possible between machines, npm offers many options that enable you to fix the version numbers in `package.json`, and even more fine-grained control with `npm-shrinkwrap.json`.
143
+
> :bulb: When you distribute your application, we recommend adding the `node_modules` folder to `.gitignore` so that you don't clutter your repo with needless files. This also makes it easier to work with multiple platforms. If you want to keep things as similar as possible between machines, npm offers many options that enable you to fix the version numbers in `package.json`, and even more fine-grained control with `npm-shrinkwrap.json`.
144
144
145
145
### Publishing npm packages to the registry
146
146
Once you've created a package, publishing it to the world is only one command away!
@@ -162,38 +162,38 @@ We went through locally installed packages above, and installing packages global
162
162
163
163
> :bulb: The module will be installed to the path indicated by `npm bin -g`.
164
164
165
-
2.`http-server .` to start a basic fileserver from any directory.
165
+
2.Run `http-server .` to start a basic fileserver from any directory.
166
166
167
167
### And much more!
168
168
*[npm docs and tutorials](https://docs.npmjs.com/)
169
169
*[Laurie Voss - npm past, present, and future](https://www.youtube.com/watch?v=-fqu-5IuOkc)
170
170
171
-
## Configuring and customizing your Windows development environment
171
+
## Configuring your Windows development environment
172
172
### Command line console and other useful tools
173
-
One of the painpoints we hear from users is that the command line console in Windows could use some work. We hear ya, and we're [working on it](https://wpdev.uservoice.com/forums/266908). In the meantime, we want to enable you to have the best experience possible. So here are some links to recommended tools to complement your existing experience.
173
+
One of the pain points we hear from users is that the command line console in Windows could use some work. We hear ya, and we're [working on it](https://wpdev.uservoice.com/forums/266908). In the meantime, we want to enable you to have the best experience possible. So here are some links to recommended tools to complement your existing experience.
174
174
***cmd:** cmd has had some improvements in Windows 10, so be sure to check it out if you abandoned ship in the past :smiley:. When you're working with Node.js, chances are you'll be spending a bit more time in the console, so it's well worth brushing up on your CLI commands.
175
175
***PowerShell:** PowerShell is a powerful object-oriented shell (as opposed to a text-based shell). It's a bit of a learning curve, but well worth it. It also has a bunch of aliases for commands, like `ls`, that'll make bash-happy people feel more at home. Here's a [good walkthrough](https://developer.rackspace.com/blog/powershell-101-from-a-linux-guy/) of some PowerShell commands from a *nix perspective, and there are [many other resources](https://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx) to help you get started.
176
176
***Chocolatey:**[Chocolatey](https://chocolatey.org) is the apt-get of Windows. There are also some other alternatives like Ninite which have their own advantages, but Chocolatey is the most commonly used.
177
-
***Git:**`choco install git`
177
+
***Git:**`choco install git`.
178
178
***nvm-windows:**https://github.com/coreybutler/nvm-windows - there are new versions of Node.js coming out all the time, so it can be annoying to migrate between versions. nvm-windows makes it way easier to switch between various versions.
179
-
***npm-windows-upgrade:** npm is shipped with Node.js, and upgrading on Windows often requires manual upgrade steps. npm-windows-upgrade makes this process much easier. Instally it by running `npm install npm-windows-upgrade -g`, and run the command by running `npm-windows-upgrade`.
179
+
***npm-windows-upgrade:** npm is shipped with Node.js, and upgrading on Windows often requires manual upgrade steps. npm-windows-upgrade makes this process much easier. Install it by running `npm install npm-windows-upgrade -g`, and run the command by running `npm-windows-upgrade`.
180
180
***terminal emulators:** cmder and ConEmu.
181
-
***Cygwin:**[Cygwin](http://cygwin.com/index.html) can be handy if you're more familiar with bash, or are trying to use a node app that assumes a *nix environment. Cygwin is a distribution of popular GNU and other Open Source tools running on Microsoft Windows. The core part is the Cygwin library which provides the POSIX system calls and environment these programs expect.
181
+
***Cygwin:**[Cygwin](http://cygwin.com/index.html) can be handy if you're more familiar with bash, or are trying to use a Node app that assumes a *nix environment. Cygwin is a distribution of popular GNU and other open source tools running on Microsoft Windows. The core part is the Cygwin library which provides the POSIX system calls and environment these programs expect.
182
182
***Putty:** ssh client.
183
183
***WinSCP:** free FTP client.
184
184
***Fiddler:** a web debugging tool. In general, people use it for the browser-side debugging, but you can also [configure it](http://stackoverflow.com/questions/8697344/can-a-proxy-like-fiddler-be-used-with-node-jss-clientrequest) to view server-side requests from Node.js.
185
185
186
-
> :triangular_flag_on_post:**TODO** Provide more dev environment options and a powershell script to make things easier.
186
+
> :triangular_flag_on_post:**TODO** Provide more dev environment options and a PowerShell script to make things easier.
187
187
188
-
> :chart_with_upwards_trend:**IN PROGRESS** We're currently planning the next Windows release, so it's a great time to let us know your biggest command line painpoints!
188
+
> :chart_with_upwards_trend:**IN PROGRESS** We're currently planning the next Windows release, so it's a great time to let us know your biggest command line pain points!
189
189
190
190
### Editors and IDEs
191
191
***[Visual Studio Code](https://code.visualstudio.com/)** is a light weight code editor. Yet, it offers powerful capabilies in [editing](https://code.visualstudio.com/Docs/editor/editingevolved), [debugging](https://code.visualstudio.com/Docs/editor/debugging), and [git integration](https://code.visualstudio.com/Docs/editor/versioncontrol) for Node.js development. It is free and available on your favorite platform - Windows, Mac, and Linux. For more information, check out: http://johnpapa.net/visual-studio-code.
192
192
193
193
***[Node.js Tools for Visual Studio](https://aka.ms/explorentvs)** is a free, open-source extension that turns Visual Studio into a powerful Node.js IDE: intelligent code completions, advanced debugging and profiling, cloud deployment, unit-testing, REPL window, and more. For more information, check out this [overview video.](https://channel9.msdn.com/Blogs/Seth-Juarez/Nodejs-Tools-for-Visual-Studio)
194
194
195
-
### MAX_PATH Explanation and Workarounds
196
-
For the uninitiated, MAX_PATH is a limitation with many windows tools and APIs that sets the maximum path character length to 260 characters. There are some workarounds involving UNC paths, but unfortunately not all APIs support it, and that's not the default. This can be problematic when working with node modules because dependencies are often installed in a nested manner.
195
+
### MAX_PATH explanation and workarounds
196
+
For the uninitiated, MAX_PATH is a limitation with many Windows tools and APIs that sets the maximum path character length to 260 characters. There are some workarounds involving UNC paths, but unfortunately not all APIs support it, and that's not the default. This can be problematic when working with Node modules because dependencies are often installed in a nested manner.
197
197
198
198
#### Workarounds
199
199
@@ -205,7 +205,7 @@ For the uninitiated, MAX_PATH is a limitation with many windows tools and APIs t
205
205
*`> npm install -g flatten-packages`
206
206
moves all packages to top-level, but can cause versioning issues
207
207
*:heart: Upgrade to npm@3
208
-
* Ships with node v5
208
+
* Ships with Node v5
209
209
* Or… > npm install –g npm-windows-upgrade
210
210
* Future:
211
211
* .NET file APIs:
@@ -220,8 +220,8 @@ There are three primary reasons you might be interested in this section:
220
220
* you are interested in optimizing the performance of some code by writing it in C++
221
221
* you're running into dreaded `node-gyp` issues and have no idea what's going on.
222
222
223
-
#### Identifying Native Modules
224
-
How do you know if an npm package you want to install is a native module? Look for nan, node-gyp, or node-pre-gyp dependencies.
223
+
#### Identifying native modules
224
+
How do you know if an npm package you want to install is a native module? Look for `nan`, `node-gyp`, or `node-pre-gyp` dependencies.
@@ -241,7 +242,7 @@ How do you know if an npm package you want to install is a native module? Look f
241
242
* Download Python 2.7 (3.x will not work)
242
243
* Download Visual Studio 2015 (free Community Edition and Express for Desktop work)
243
244
244
-
> :bulb: During install, be sure to check the the C++ option.
245
+
> :bulb: During installation, be sure to check the the C++ option.
245
246
246
247
> :chart_with_upwards_trend:**IN PROGRESS** there are currently two efforts underway to make it easier to install native modules.
247
248
* We recognize that installing full VS can be burdensome, so we're investigating ways to provide a bundle with just the required compiler dependencies on Windows. Watch [this thread](https://github.com/nodejs/node-gyp/issues/629) for updates.
@@ -275,24 +276,24 @@ Sometimes, when deploying a native module to production, oftentimes it is not po
275
276
* Cross-platform remote debugging.
276
277
* iisnode:
277
278
*[GitHub repo](https://github.com/tjanczuk/iisnode/wiki) and [wiki](https://github.com/tjanczuk/iisnode/wiki)
278
-
*[Scott Hanselman blog post](Installing and Running node.js applications within IIS on Windows - Are you mad?)
279
+
*[Scott Hanselman's blog post](http://www.hanselman.com/blog/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx)
279
280
280
281
## Application-specific tips and tricks
281
282
> :triangular_flag_on_post:**TODO**
282
283
* Setting up MongoDB.
283
284
* Setting up SQL.
284
285
* .NET in-process using Edge.js.
285
-
*[node-windows](https://github.com/coreybutler/node-windows): Windows services, logging, and commands using Node.js
286
+
*[node-windows](https://github.com/coreybutler/node-windows): Windows services, logging, and commands using Node.js.
286
287
287
288
## Node.js + Microsoft products, services, and contributions
288
-
*[**Visual Studio Code**](https://code.visualstudio.com/): lightweight cross-platform editor for building and debugging modern web and cloud applications.
289
+
*[**Visual Studio Code**](https://code.visualstudio.com/): Lightweight cross-platform editor for building and debugging modern web and cloud applications.
289
290
*[**Node.js Tools for Visual Studio**](https://www.visualstudio.com/features/node-js-vs): Free, open-source extension that turns Visual Studio into a powerful Node.js development environment.
290
291
*[**TypeScript**](https://www.npmjs.com/package/typescript): TypeScript is a language for application scale JavaScript development.
291
292
* Also useful for working with typescript is [tsd](https://www.npmjs.com/package/tsd), which enables you to quickly download TypeScript definition files.
292
293
*[**Azure SDK for Node.js**](https://github.com/Azure/azure-sdk-for-node#readme): We provide both [fine-grained modules](https://www.npmjs.com/~windowsazure) for different Microsoft Azure services which you can install separately, and an [all-up module](https://www.npmjs.com/package/azure) which contains everything.
293
-
*[**Application Insights**](https://www.npmjs.com/~msftapplicationinsights): monitor your application's performance and usage with just a few lines of code.
294
+
*[**Application Insights**](https://www.npmjs.com/~msftapplicationinsights): Monitor your application's performance and usage with just a few lines of code.
294
295
*[**Node-Chakra and Windows IoT**](https://github.com/Microsoft/node#readme): This project enables Node.js to optionally use the Chakra JavaScript engine on Windows 10, allowing Node.js to run on Windows 10 IoT.
295
-
*[**VS Online**](https://www.npmjs.com/~vsonline)
296
+
*[**Visual Studio Online**](https://www.npmjs.com/~vsonline)
*[**Node.js Technical Steering Committee**](https://nodejs.org/en/foundation/tsc/) and [**Node.js Foundation Board**](https://nodejs.org/en/foundation/board/)
0 commit comments