Watch command.

This commit is contained in:
marco
2015-07-20 18:02:40 +02:00
parent 2258b215df
commit eb50d2e536
2 changed files with 13 additions and 32 deletions

View File

@ -10,33 +10,20 @@ Not another MP2 a.k.a MP3 done the right way.
# Install. # Install.
- Clone the repo in wp-content/plugins. - Clone the repo in wp-content/plugins.
- Install PHP (OSX comes with it). - Install system dependencies:
- Install NodeJS. PHP, NodeJS, PhantomJS.
- Install composer. - Install composer.
```sh ```sh
$ curl -sS https://getcomposer.org/installer | php $ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install $ php composer.phar install
``` ```
- Install dependencies. - Install PHP dependencies.
```sh ```sh
$ php composer.phar install $ php composer.phar install
``` ```
- Instal NPM - Instal JS dependencies
```sh ```sh
$ npm install npm -g $ npm install
```
- Install Bower
```
$ npm install bower -g
```
- Install Stylus
```sh
$ npm install stylus -g
```
- Install Nib (Stylus extension)
```sh
$ npm install nib -g
```
# Structure. # Structure.
@ -67,21 +54,11 @@ Kickstart file.
Unit tests are in /tests/unit. You can just duplicate a Cest file and start testing. Methods available for testing come from Verify: Unit tests are in /tests/unit. You can just duplicate a Cest file and start testing. Methods available for testing come from Verify:
https://github.com/Codeception/Verify https://github.com/Codeception/Verify
``` ```
$ vendor/bin/codecept run $ ./do test:unit
``` ```
# Acceptance testing. # Acceptance testing.
- Install PhantomJS:
```
$ brew|aptitude install phantomjs
```
- Run PhantomJS:
```
$ phantomjs --webdriver=4444
```
- Run a WordPress install at: - Run a WordPress install at:
``` ```
127.0.0.1:8888 127.0.0.1:8888
@ -89,7 +66,7 @@ $ phantomjs --webdriver=4444
- Run tests: - Run tests:
``` ```
$ vendor/bin/codecept run $ ./do tes:acceptance
``` ```
# Stylus command # Stylus command

View File

@ -19,10 +19,14 @@ class RoboFile extends \Robo\Tasks {
function testAll() { function testAll() {
$this $this
->taskExec('phantomjs --webdriver=4444') ->taskexec('phantomjs --webdriver=4444')
->background() ->background()
->run(); ->run();
sleep(2); sleep(2);
$this->_exec('vendor/bin/codecept run'); $this->_exec('vendor/bin/codecept run');
} }
function watch() {
$this->_exec('./node_modules/stylus/bin/stylus -u nib -w assets/css/src/admin.styl -o assets/css/');
}
} }