Example #1
0
 /**
  * Get base RequireJs configuration necessary for working with Magento application
  *
  * @return string
  */
 public function getBaseConfig()
 {
     $config = ['baseUrl' => $this->staticContext->getBaseUrl() . $this->staticContext->getPath()];
     $config = json_encode($config, JSON_UNESCAPED_SLASHES);
     $result = "require.config({$config});";
     return $result;
 }
Example #2
0
 /**
  * Get base RequireJs configuration necessary for working with Magento application
  *
  * @return string
  */
 public function getBaseConfig()
 {
     $config = array('baseUrl' => $this->staticContext->getBaseUrl() . $this->staticContext->getPath(), 'paths' => array('magento' => self::NORMALIZE_PLUGIN_PATH), 'waitSeconds' => 0);
     $config = json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
     return "require.config({$config});\n";
 }