Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit de115e3

Browse files
committed
Fixes #227: Document Nodejs usage and Node/Ruby inclusion.
1 parent abc4138 commit de115e3

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ It will install the following on an Ubuntu 14.04 (by default) linux VM:
1717
- Optional:
1818
- Varnish 4.x
1919
- Apache Solr 4.10.x (configurable)
20+
- Node.js
2021
- Selenium, for testing your sites via Behat
22+
- Ruby
2123
- Memcached
2224
- XHProf, for profiling your code
2325
- XDebug, for debugging your code

docs/extras/nodejs.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
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.
2+
3+
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.
4+
5+
## Choosing a version of Node.js
6+
7+
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.
8+
9+
```yaml
10+
nodejs_version: "0.12"
11+
```
12+
13+
## Installing global packages via NPM
14+
15+
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:
16+
17+
```yaml
18+
nodejs_npm_global_packages:
19+
- name: phantomjs
20+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pages:
2222
- 'Use Drupal Console with Drupal VM': 'extras/drupal-console.md'
2323
- 'Use Varnish with Drupal VM': 'extras/varnish.md'
2424
- 'Use MariaDB instead of MySQL': 'extras/mariadb.md'
25+
- 'Use Node.js and NPM': 'extras/nodejs.md'
2526
- 'View Logs with Pimp my Log': 'extras/pimpmylog.md'
2627
- 'Profile Code with XHProf': 'extras/xhprof.md'
2728
- 'Debug Code with XDebug': 'extras/xdebug.md'

0 commit comments

Comments
 (0)