Refactoring commands for an easier use.

This commit is contained in:
marco
2015-07-20 18:10:13 +02:00
parent eb50d2e536
commit fb5deb7d29
3 changed files with 27 additions and 22 deletions

View File

@ -2,28 +2,26 @@
Not another MP2 a.k.a MP3 done the right way. Not another MP2 a.k.a MP3 done the right way.
# Requirements.
- PHP >=5.3.6 (production).
- PHP >=5.5 (dev).
# Install. # Install.
- Clone the repo in wp-content/plugins.
- Install system dependencies: - Install system dependencies:
PHP, NodeJS, PhantomJS. ```
php
nodejs
phantomjs
```
- Clone the repo in wp-content/plugins.
- Install composer. - Install composer.
```sh ```sh
$ curl -sS https://getcomposer.org/installer | php $ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
``` ```
- Install PHP dependencies.
- Install dependencies.
```sh ```sh
$ php composer.phar install $ ./do update
``` ```
- Instal JS dependencies
```sh
$ npm install
# Structure. # Structure.
@ -51,8 +49,7 @@ Kickstart file.
# Unit testing. # Unit testing.
Unit tests are in /tests/unit. You can just duplicate a Cest file and start testing. Methods available for testing come from Verify: - Run tests:
https://github.com/Codeception/Verify
``` ```
$ ./do test:unit $ ./do test:unit
``` ```
@ -69,5 +66,7 @@ $ ./do test:unit
$ ./do tes:acceptance $ ./do tes:acceptance
``` ```
# Stylus command # Watch assets.
stylus -u nib -w assets/css/src/admin.styl -o assets/css/ ```
$ ./do watch
```

View File

@ -1,7 +1,13 @@
<?php <?php
class RoboFile extends \Robo\Tasks { class RoboFile extends \Robo\Tasks {
function install() {
$this->_exec('./composer.phar install');
$this->_exec('npm install');
}
function update() { function update() {
$this->_exec('./composer.phar update'); $this->_exec('./composer.phar update');
$this->_exec('npm update');
} }
function testUnit() { function testUnit() {

10
composer.lock generated
View File

@ -653,16 +653,16 @@
}, },
{ {
"name": "myclabs/deep-copy", "name": "myclabs/deep-copy",
"version": "1.3.0", "version": "1.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/myclabs/DeepCopy.git", "url": "https://github.com/myclabs/DeepCopy.git",
"reference": "96fbdc07635989c35c5a1912379f4c4b2ab15fd5" "reference": "95d662954e06000cdf63ec9c9f0a6c598d9c5eb9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/96fbdc07635989c35c5a1912379f4c4b2ab15fd5", "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/95d662954e06000cdf63ec9c9f0a6c598d9c5eb9",
"reference": "96fbdc07635989c35c5a1912379f4c4b2ab15fd5", "reference": "95d662954e06000cdf63ec9c9f0a6c598d9c5eb9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -691,7 +691,7 @@
"object", "object",
"object graph" "object graph"
], ],
"time": "2015-03-21 22:40:23" "time": "2015-07-19 19:57:13"
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",