Add webpack for frontend dependency loading

This commit is contained in:
Tautvidas Sipavičius
2015-08-12 14:40:57 +03:00
parent 0df8973b7e
commit c1f9fb915b
5 changed files with 85 additions and 2 deletions

View File

@ -30,6 +30,10 @@ class RoboFile extends \Robo\Tasks {
$this->_exec(join(' ', $command));
}
function bundleJavascript() {
$this->_exec('./node_modules/webpack/bin/webpack.js');
}
function makepot() {
$this->_exec('grunt makepot'.
' --gruntfile '.__DIR__.'/tasks/makepot/makepot.js'.
@ -61,6 +65,11 @@ class RoboFile extends \Robo\Tasks {
$this->_exec('vendor/bin/codecept run acceptance');
}
function testJavascript() {
// TODO: regenerate test bundle before running mocha tests
$this->_exec('./node_modules/mocha/bin/mocha -r tests/javascript/mochaTestHelper.js tests/javascript/newsletter_editor/testBundle.js');
}
function testAll() {
$this->_exec('vendor/bin/codecept build');
$this->loadEnv();