app/src/Apnet/Dev/Factory/Importer/BootstrapImporter.php
protected function getBootstrapSassJavascripts()
  {
    $process = new Process("gem which bootstrap-sass");
    $process->run();
    if (!$process->isSuccessful()) {
      throw new WatcherCompileException(
        "`bootstrap-sass` gem was not found\n\n" . $process->getOutput()
      );
    }

    $gemPath = trim($process->getOutput());
    $bjsRootPath = dirname(dirname($gemPath)) . "/assets/javascripts";
    $bjsPath = $bjsRootPath . "/bootstrap-sprockets.js";
    $bjs = file_get_contents($bjsPath);

    $inputs = array();
    $matches = array();
    if (preg_match_all("/\/\/= require (.*)/i", $bjs, $matches)) {
      foreach ($matches[1] as $asset) {
        $inputs[] = $bjsRootPath . "/" . $asset . ".js";
      }
    } else {
      $inputs[] = $bjsPath;
    }
    return $inputs;
  }
protected function getBootstrapSassJavascripts()
  {
    $process = new Process("gem which bootstrap-sass");
    $process->run();
    if (!$process->isSuccessful()) {
      throw new WatcherCompileException(
        "`bootstrap-sass` gem was not found\n\n" . $process->getOutput()
      );
    }

    $gemPath = trim($process->getOutput());
    $bjsRootPath = dirname(dirname($gemPath)) . "/assets/javascripts";
    $bjsPath = $bjsRootPath . "/bootstrap-sprockets.js";
    $bjs = file_get_contents($bjsPath);

    $inputs = array();
    $matches = array();
    if (preg_match_all("/\/\/= require (.*)/i", $bjs, $matches)) {
      foreach ($matches[1] as $asset) {
        $inputs[] = $bjsRootPath . "/" . $asset . ".js";
      }
    } else {
      $inputs[] = $bjsPath;
    }
    return $inputs;
  }
protected function getBootstrapSassJavascripts ( ) { $ process = new Process ( "gem which bootstrap-sass" ) ; $ process -> run ( ) ; if ( ! $ process -> isSuccessful ( ) ) { throw new WatcherCompileException ( "`bootstrap-sass` gem was not found\n\n" . $ process -> getOutput ( ) ) ; } $ gemPath = trim ( $ process -> getOutput ( ) ) ; $ bjsRootPath = dirname ( dirname ( $ gemPath ) ) . "/assets/javascripts" ; $ bjsPath = $ bjsRootPath . "/bootstrap-sprockets.js" ; $ bjs = file_get_contents ( $ bjsPath ) ; $ inputs = array ( ) ; $ matches = array ( ) ; if ( preg_match_all ( "/\/\/= require (.*)/i" , $ bjs , $ matches ) ) { foreach ( $ matches [ 1 ] as $ asset ) { $ inputs [ ] = $ bjsRootPath . "/" . $ asset . ".js" ; } } else { $ inputs [ ] = $ bjsPath ; } return $ inputs ; }
Get a list of js files

@throws WatcherCompileException
@return array
Get a list of js files