Skip to content

Commit

Permalink
Add in missing buildApiFiles method (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
o-samoilov authored and wilsonge committed Aug 23, 2019
1 parent 9ed1190 commit 36f6fc2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/Tasks/Build/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ class Base extends JTask implements TaskInterface
*/
protected static $frontendFiles = array();

/**
* Api files
*
* They need to be static in order to support multiple files and LANGUAGE
*
* @var array
*
* @since 1.0
*/
protected static $apiFiles = array();

/**
* Backend files
*
Expand Down Expand Up @@ -181,6 +192,20 @@ public function addFrontendFiles($fileArray)
self::$frontendFiles = array_merge(self::$frontendFiles, $fileArray);
}

/**
* Adds Files / Folders to media array
*
* @param array $fileArray Array of files / folders
*
* @return void
*
* @since 1.0
*/
public function addApiFiles($fileArray)
{
self::$apiFiles = array_merge(self::$apiFiles, $fileArray);
}

/**
* Adds Files / Folders to media array
*
Expand Down
1 change: 1 addition & 0 deletions src/Tasks/Deploy/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ public function createComponentZip()
$this->_remove(JPATH_BASE . $tmp_path . '/administrator/manifests');
$this->_copyDir($this->current . '/language', JPATH_BASE . $tmp_path . '/language');
$this->_copyDir($this->current . '/components', JPATH_BASE . $tmp_path . '/components');
$this->_copyDir($this->current . '/api', JPATH_BASE . $tmp_path . '/api');

if (file_exists($this->current . '/media'))
{
Expand Down

0 comments on commit 36f6fc2

Please sign in to comment.