RIA Builder

PHP Application for build html, css, less, js files to one file. Is very simple method to compile JavaScript application for production.
Library uses only PHP so you do not need to install other applications to compress less and minify css.

Source code
Where used


  • Supported formats are JavaScript, CSS, LESS, HTML;
  • Loading inside modules;
  • Loading files by mask (*.js);
  • Compilationg and minification of LESS to CSS files only by using PHP interpreter;
  • Include js/css/template by browser conditions;
  • Build package from command line or dynamically from php;
  • Add function–wrappers for JavaScript code;
  • Main code have unit tests.


Suppose we have a simple application

@color: red;
body {
    color: @color;
and testapp/main.js
function a(message) {

Create package.json for build

    "include": [
            "type": "less",
            "files": [
            "browser": "ie <=6"

Build package, for example through the console

/var/www/riabuilder/run -c testapp

As result we have testapp_min.js file with following content

... // Javascript part of RIABuilder library
if (RIABuilder.matchBrowser("ie <9")){RIABuilder.appendStyle("body {color: red;}");}
function a(m) {alert(m);}

Fields of application

Library can be used for small or middle size web–applications, because it does not have files relations tracking. I used it for some projects. You can see more information GitHub.