forked from geerlingguy/drupal-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes geerlingguy#227: Document Nodejs usage and Node/Ruby inclusion.
- Loading branch information
1 parent
2afb48b
commit 34c5be1
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Node.js is used for many different purposes, but with Drupal, it is most often used as part of a toolset for Front End development or certain CI tasks. | ||
|
||
Drupal VM includes built-in support for Node.js—all you need to do is make sure `nodejs` is listed in the list of `installed_extras` inside `config.yml` before your provision Drupal VM. | ||
|
||
## Choosing a version of Node.js | ||
|
||
You can choose a version of Node.js to install using the `nodejs_version` variable in `config.yml`. See the `geerlingguy.nodejs` role documentation for all the currently-available versions for your OS. | ||
|
||
```yaml | ||
nodejs_version: "0.12" | ||
``` | ||
## Installing global packages via NPM | ||
To install packages globally, you can add them to the list of `nodejs_npm_global_packages` in `config.yml`. As an example, many developers use `phantomjs` as a ghost web driver for Behat tests inside Drupal VM. To install it globally, add it to the list: | ||
|
||
```yaml | ||
nodejs_npm_global_packages: | ||
- name: phantomjs | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters