Puppet Class: nodejs

Defined in:
manifests/init.pp

Overview

Class: nodejs

This module installs a full nodenv-driven node stack

Parameters:

  • provider (Any) (defaults to: $nodejs::provider)
  • prefix (Any) (defaults to: $nodejs::prefix)
  • user (Any) (defaults to: $nodejs::user)


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/init.pp', line 5

class nodejs(
  $provider = $nodejs::provider,
  $prefix   = $nodejs::prefix,
  $user     = $nodejs::user,
) {
  if $::osfamily == 'Darwin' {
    include boxen::config
  }

  include nodejs::build

  $provider_class = "nodejs::${provider}"
  include $provider_class

  if $::osfamily == 'Darwin' {
    boxen::env_script { 'nodejs':
      content  => template('nodejs/nodejs.sh'),
      priority => 'higher',
    }
  }

  file { '/opt/nodes':
    ensure => directory,
    owner  => $user,
  }

  Class['nodejs::build'] ->
    Class[$provider_class] ->
    Nodejs <| |> ->
    Npm_module <| |>
}