Completed
Push — master ( d282cd...4ba9d6 )
by Dimas
28:14 queued 11:55
created

npm()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 2
eloc 5
nc 2
nop 2
dl 0
loc 9
rs 10
c 1
b 1
f 0
1
<?php
2
include __DIR__ . '/../breadcrumb.php';
3
/*
4
$gui = npm('npm-gui', 'localhost:9000');
5
$connection = @fsockopen($_SERVER['HTTP_HOST'], 9000);
6
$open = is_resource($connection) ? '<span class="badge badge-success mr-1">Running</span> <a href="//' . $_SERVER['HTTP_HOST'] . ':9000" class="badge badge-primary">access</a>' : '<span class="badge badge-danger">Stopped</span>';
7
8
function npm($cmd, $arg)
9
{
10
  $ext = '';
11
  if (\MVC\helper::is_windows()) {
12
    $ext = '.cmd';
13
  }
14
  $command = normalize_path(ROOT . '/node_modules/.bin/' . $cmd . $ext);
15
16
  return "$command $arg";
17
}
18
*/
19
?>
20
21
<div class="card">
22
  <div class="card-body">
23
    <div class="row">
24
      <div class="col">
25
        Install Typehinting VSCode
26
      </div>
27
      <div class="col-2">
28
        <button class="btn-block bg-purple text-white btn" data-toggle="ajax" data-href="registry" data-method="post" data-postdata="install=true" data-success="show_install">Install</button>
29
      </div>
30
    </div>
31
  </div>
32
</div>