From 137e226f369cb5ed02a7b73bb3acb99f37766bac Mon Sep 17 00:00:00 2001 From: brunogoossens Date: Tue, 24 Feb 2015 11:19:32 +0100 Subject: [PATCH] better uglify settings --- .gitignore | 1 + README.md | 14 ++++++++------ app/config/config.yml | 4 ++-- package.json | 7 +++++++ 4 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 2633e17..f848b06 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /vendor/ /bin/ /composer.phar +/node_modules diff --git a/README.md b/README.md index 94c0b61..3ed5a80 100644 --- a/README.md +++ b/README.md @@ -43,32 +43,34 @@ Dependencies sudo apt-get install php5-curl sudo apt-get install mongodb sudo apt-get install npm - sudo npm install uglifycss -g - sudo npm install uglify-js -g Get the code git clone git@github.com:brunogoossens/BBB-Load-Balancer.git /var/www/bbb-load-balancer cd /var/www/bbb-load-balancer +Get NPM packages + + $ npm install + Edit the config file - cp app/config/parameters.yml.dist app/config/parameters.yml + $ cp app/config/parameters.yml.dist app/config/parameters.yml Change the bbb.salt value inside the file. The salt must be the same on all BBB servers You can also change other values if you like. Get composer - curl -s https://getcomposer.org/installer | php + $ curl -s https://getcomposer.org/installer | php Update and install packages with composer - composer update + $ composer update Start server (without apache or nginx) - app/console server:run --env=prod + $ app/console server:run --env=prod If you want to configure an other server like apache or nginx, you can follow [this](http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html) guide. diff --git a/app/config/config.yml b/app/config/config.yml index 31c019f..440d7bc 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -44,9 +44,9 @@ assetic: filters: cssrewrite: ~ uglifyjs2: - bin: /usr/bin/uglifyjs + bin: node_modules/.bin/uglifyjs uglifycss: - bin: /usr/bin/uglifycss + bin: node_modules/.bin/uglifycss #closure: # jar: "%kernel.root_dir%/Resources/java/compiler.jar" #yui_css: diff --git a/package.json b/package.json new file mode 100644 index 0000000..fe4ab23 --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "name": "BBBLoadBalancer.loc", + "dependencies": { + "uglify-js": "^2.4.16", + "uglifycss": "0.0.11" + } +}