Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Robo Laravel Package

consolidation/robo

Robo is a modern PHP task runner for automating common development workflows. Define tasks in a RoboFile with a clean OO API to run tests, build assets, deploy, and more. Extensible via plugins, with useful built-in tasks and CLI tooling.

View on GitHub
Deep Wiki
Context7

File Tasks

Concat

Merges files into one. Used for preparing assets.

<?php
$this->taskConcat([
     'web/assets/screen.css',
     'web/assets/print.css',
     'web/assets/theme.css'
 ])
 ->to('web/assets/style.css')
 ->run()
?>
  • to($dst)

  • param string $dst

  • setOutput($output)

  • param \Symfony\Component\Console\Output\OutputInterface $output

Replace

Performs search and replace inside a files.

<?php
$this->taskReplaceInFile('VERSION')
 ->from('0.2.0')
 ->to('0.3.0')
 ->run();

$this->taskReplaceInFile('README.md')
 ->from(date('Y')-1)
 ->to(date('Y'))
 ->run();

$this->taskReplaceInFile('config.yml')
 ->regex('~^service:~')
 ->to('services:')
 ->run();

$this->taskReplaceInFile('box/robo.txt')
 ->from(array('##dbname##', '##dbhost##'))
 ->to(array('robo', 'localhost'))
 ->run();
?>
  • filename($filename)

  • param string $filename

  • from($from)

  • param string|string[] $from

  • to($to)

  • param string|string[] $to

  • regex($regex)

  • param string $regex

  • limit($limit)

  • param int $limit

  • setOutput($output)

  • param \Symfony\Component\Console\Output\OutputInterface $output

TmpFile

Create a temporary file that is automatically cleaned up once the task collection is is part of completes. When created, it is given a random filename.

This temporary file may be manipulated exacatly like taskWrite(). It is deleted as soon as the collection it is a part of completes or rolls back.

<?php
$collection = $this->collectionBuilder();
$tmpFilePath = $collection->taskTmpFile()
     ->line('-----')
     ->line(date('Y-m-d').' '.$title)
     ->line('----')
     ->getPath();
$collection->run();
?>
  • complete()

Delete this file when our collection completes.

  • filename($filename)

  • param string $filename

  • append($append = null)

  • param bool $append

  • line($line)

  • param string $line

  • lines(array $lines)

  • param array $lines

  • text($text)

  • param string $text

  • textFromFile($filename)

  • param string $filename

  • place($name, $val)

  • param string $name

  • replace($string, $replacement)

  • param string $string

  • regexReplace($pattern, $replacement)

  • param string $pattern

  • appendIfMatches($pattern, $text)

  • param string $pattern

  • appendUnlessMatches($pattern, $text)

  • param string $pattern

  • originalContents()

  • return string

  • wouldChange()

  • return bool

  • getPath()

  • return string

  • setOutput($output)

  • param \Symfony\Component\Console\Output\OutputInterface $output

Write

Writes to file.

<?php
$this->taskWriteToFile('blogpost.md')
     ->line('-----')
     ->line(date('Y-m-d').' '.$title)
     ->line('----')
     ->run();
?>
  • filename($filename)

  • param string $filename

  • append($append = null)

  • param bool $append

  • line($line)

  • param string $line

  • lines(array $lines)

  • param array $lines

  • text($text)

  • param string $text

  • textFromFile($filename)

  • param string $filename

  • place($name, $val)

  • param string $name

  • replace($string, $replacement)

  • param string $string

  • regexReplace($pattern, $replacement)

  • param string $pattern

  • appendIfMatches($pattern, $text)

  • param string $pattern

  • appendUnlessMatches($pattern, $text)

  • param string $pattern

  • originalContents()

  • return string

  • wouldChange()

  • return bool

  • getPath()

  • return string

  • setOutput($output)

  • param \Symfony\Component\Console\Output\OutputInterface $output

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport