Skip to content

Commit

Permalink
Fixes geerlingguy#227: Document Nodejs usage and Node/Ruby inclusion.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy authored and ravbaba committed Sep 23, 2015
1 parent 2afb48b commit 34c5be1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ It will install the following on an Ubuntu 14.04 (by default) linux VM:
- Optional:
- Varnish 4.x
- Apache Solr 4.10.x (configurable)
- Node.js
- Selenium, for testing your sites via Behat
- Ruby
- Memcached
- XHProf, for profiling your code
- XDebug, for debugging your code
Expand Down
20 changes: 20 additions & 0 deletions docs/extras/nodejs.md
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
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pages:
- 'Use Drupal Console with Drupal VM': 'extras/drupal-console.md'
- 'Use Varnish with Drupal VM': 'extras/varnish.md'
- 'Use MariaDB instead of MySQL': 'extras/mariadb.md'
- 'Use Node.js and NPM': 'extras/nodejs.md'
- 'View Logs with Pimp my Log': 'extras/pimpmylog.md'
- 'Profile Code with XHProf': 'extras/xhprof.md'
- 'Debug Code with XDebug': 'extras/xdebug.md'
Expand Down

0 comments on commit 34c5be1

Please sign in to comment.