Skip to content

Commit

Permalink
Check if yarn install is needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelle-S committed Jun 24, 2020
1 parent 4827541 commit a3bb786
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/RoboFileBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,25 @@ protected function buildTask($archivename = null)
{
$archive = is_null($archivename) ? $this->time . '.tar.gz' : $archivename;
$collection = $this->collectionBuilder();
$collection
->taskThemeCompile()
->taskExec($this->findExecutable('yarn') . ' run encore production')
->taskThemeClean()
->taskPackageProject($archive)
->ignoreFileNames([
'.gitattributes',
'.gitignore',
'.gitkeep',
'README',
'README.txt',
'README.md',
'LICENSE',
'LICENSE.txt',
'LICENSE.md',
'phpunit.xml.dist'
]);
if (file_exists('package.json')) {
$collection
->taskThemeCompile()
->taskExec($this->findExecutable('yarn') . ' run encore production')
->taskThemeClean();
}
$collection->taskPackageProject($archive)
->ignoreFileNames([
'.gitattributes',
'.gitignore',
'.gitkeep',
'README',
'README.txt',
'README.md',
'LICENSE',
'LICENSE.txt',
'LICENSE.md',
'phpunit.xml.dist'
]);
return $collection;
}

Expand Down

0 comments on commit a3bb786

Please sign in to comment.