diff --git a/docs/tasks/Assets.md b/docs/tasks/Assets.md index 091ba95f3..2878819e1 100644 --- a/docs/tasks/Assets.md +++ b/docs/tasks/Assets.md @@ -1,4 +1,30 @@ # Assets Tasks +## Less + + +Compiles less files. + +```php +taskLess([ + 'less/default.less' => 'css/default.css' +]) +->run(); +?> +``` + +Use one of both less compilers in your project: + +``` +"leafo/lessphp": "~0.5", +"oyejorge/less.php": "~1.5" +``` + +You can implement additional compilers by extending this task and adding a +method named after them and overloading the lessCompilers() method to +inject the name there. + +* `compiler($compiler, array $options = Array ( ) )` Sets the less compiler. ## Minify @@ -21,5 +47,8 @@ Please install additional dependencies to use: * `to($dst)` Sets destination. Tries to guess type from it. * `type($type)` Sets type with validation. +* `singleLine($singleLine)` Single line option for the JS minimisation. +* `keepImportantComments($keepImportantComments)` keepImportantComments option for the JS minimisation. +* `specialVarRx($specialVarRx)` specialVarRx option for the JS minimisation. * `__toString()` @return string diff --git a/docs/tasks/Base.md b/docs/tasks/Base.md index d06cc601a..b584cdb59 100644 --- a/docs/tasks/Base.md +++ b/docs/tasks/Base.md @@ -22,6 +22,7 @@ if ($this->taskExec('phpunit .')->run()->wasSuccessful()) { #### *public static* instances* `background()` Executes command in background mode (asynchronously) * `timeout($timeout)` Stop command if it runs longer then $timeout in seconds * `idleTimeout($timeout)` Stops command if it does not output something for a while +* `env(array $env)` Sets the environment variables for the command * `dir($dir)` changes working directory of command * `printed($arg)` Should command output be printed * `arg($arg)` Pass argument to executable diff --git a/docs/tasks/Development.md b/docs/tasks/Development.md index fcc103dc8..7acd94898 100644 --- a/docs/tasks/Development.md +++ b/docs/tasks/Development.md @@ -166,17 +166,17 @@ Runs PHP server and stops it when task finishes. ``` php taskPhpServer(8000) +$this->taskServer(8000) ->dir('public') ->run(); // run with IP 0.0.0.0 -$this->taskPhpServer(8000) +$this->taskServer(8000) ->host('0.0.0.0') ->run(); // execute server in background -$this->taskPhpServer(8000) +$this->taskServer(8000) ->background() ->run(); ?> @@ -187,6 +187,7 @@ $this->taskPhpServer(8000) * `background()` Executes command in background mode (asynchronously) * `timeout($timeout)` Stop command if it runs longer then $timeout in seconds * `idleTimeout($timeout)` Stops command if it does not output something for a while +* `env(array $env)` Sets the environment variables for the command * `printed($arg)` Should command output be printed * `arg($arg)` Pass argument to executable * `args($args)` Pass methods parameters as arguments to executable diff --git a/docs/tasks/File.md b/docs/tasks/File.md index 4e5bfe1cf..32110f848 100644 --- a/docs/tasks/File.md +++ b/docs/tasks/File.md @@ -39,12 +39,17 @@ $this->taskReplaceInFile('config.yml') ->regex('~^service:~') ->to('services:') ->run(); + +$this->taskReplaceInFile('box/robo.txt') + ->from(array('##dbname##', '##dbhost##')) + ->to(array('robo', 'localhost')) + ->run(); ?> ``` * `regex(string)` regex to match string to be replaced -* `from(string)` string to be replaced -* `to(string)` value to be set as a replacement +* `from(string|array)` string(s) to be replaced +* `to(string|array)` value(s) to be set as a replacement @@ -68,7 +73,7 @@ $this->taskWriteToFile('blogpost.md') * `lines(array $lines)` add more lines * `text($text)` add a text * `textFromFile($filename)` add a text from a file -* `place($name, $val)` substitute a placeholder with value, placeholder must be enclosed by {{}} +* `place($name, $val)` substitute a placeholder with value, placeholder must be enclosed by `{}` * `replace($string, $replacement)` replace any string with value * `regexReplace($pattern, $replacement)` replace any string with value using regular expression diff --git a/docs/tasks/FileSystem.md b/docs/tasks/FileSystem.md index 2de8fad76..38009701a 100644 --- a/docs/tasks/FileSystem.md +++ b/docs/tasks/FileSystem.md @@ -28,7 +28,7 @@ $this->_copyDir('dist/config', 'config'); ?> ``` - +* `dirPermissions($value)` Sets the default folder permissions for the destination if it doesn't exist ## DeleteDir diff --git a/docs/tasks/Remote.md b/docs/tasks/Remote.md index 1d93679d6..d1f7e6aa3 100644 --- a/docs/tasks/Remote.md +++ b/docs/tasks/Remote.md @@ -10,6 +10,7 @@ $this->taskRsync() ->toHost('localhost') ->toUser('dev') ->toPath('/var/www/html/app/') + ->remoteShell('ssh -i public_key') ->recursive() ->excludeVcs() ->checksum() @@ -66,6 +67,7 @@ if ('y' === $this->ask('Do you want to run (y/n)')) { * `exclude($pattern)` * `excludeFrom($file)` * `filesFrom($file)` +* `remoteShell($command)` * `dir($dir)` changes working directory of command * `printed($arg)` Should command output be printed * `arg($arg)` Pass argument to executable diff --git a/docs/tasks/Testing.md b/docs/tasks/Testing.md index ee4271b1b..5277acc6b 100644 --- a/docs/tasks/Testing.md +++ b/docs/tasks/Testing.md @@ -59,11 +59,12 @@ $this->taskPHPUnit() * `group($group)` * `excludeGroup($group)` * `json($file = null)` adds `log-json` option to runner -* `xml($file = null)` adds `log-xml` option +* `xml($file = null)` adds `log-junit` option * `tap($file = null)` * `bootstrap($file)` * `configFile($file)` * `debug()` +* `files($files)` Test files to run. * `dir($dir)` changes working directory of command * `printed($arg)` Should command output be printed * `arg($arg)` Pass argument to executable diff --git a/docs/tasks/Vcs.md b/docs/tasks/Vcs.md index abf6ffe8b..ce2cb9c6a 100644 --- a/docs/tasks/Vcs.md +++ b/docs/tasks/Vcs.md @@ -11,6 +11,8 @@ $this->taskGitStack() ->add('-A') ->commit('adding everything') ->push('origin','master') + ->tag('0.6.0') + ->push('origin','0.6.0') ->run() $this->taskGitStack() @@ -29,6 +31,7 @@ $this->taskGitStack() * `push($origin = null, $branch = null)` Executes `git push` command * `merge($branch)` Performs git merge * `checkout($branch)` Executes `git checkout` command +* `tag($tag_name)` Executes `git tag` command * `exec($command)` * `dir($dir)` changes working directory of command * `printed($arg)` Should command output be printed