Skip to content
Newer
Older
100644 72 lines (45 sloc) 2.1 KB
924db2b @fguillen README fix and TODO add
authored Dec 13, 2011
1 # Evax Assets Compressor
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
2
6a5a1a4 @fguillen adding logo to README
authored Dec 13, 2011
3 ![Evax compressor logo](http://farm8.staticflickr.com/7166/6505430865_1f9f232e8c_o_d.png)
b59ec30 updating README
Juan José Vidal authored Dec 22, 2011
4
5
6a5a1a4 @fguillen adding logo to README
authored Dec 13, 2011
6 *Evax compressor make you feel lighter*
7
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
8 Evax is a simple asset packaging library for Ruby, providing JavaScript/CSS concatenation and compression using UglifyJS and a really simple regex based CSS compressor. Just because enough is enough.
9
b59ec30 updating README
Juan José Vidal authored Dec 22, 2011
10 The idea behind it is to have a really **simple library to compress your assets** in the simplest way without any weird dependency (who said Java?). There are nice assets packaging systems out there but they have too many options for some cases.
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
11
6a5a1a4 @fguillen adding logo to README
authored Dec 13, 2011
12 Create a YAML file describing assets, Evax will take it and compress the javascript and stylesheets files to the *output directory* of your choice. Done.
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
13
14 ## Instalation
15
69d30d8 @fguillen cleaning README
authored Dec 14, 2011
16 gem install evax
b59ec30 updating README
Juan José Vidal authored Dec 22, 2011
17
69d30d8 @fguillen cleaning README
authored Dec 14, 2011
18 ## Dependencies
19
20 As *Evax* has a dependency in *uglifier* who has a dependency in *execjs* it is needed to have a proper **JS runtime** installed in your system. Pick one from the [execjs README page](https://github.com/sstephenson/execjs)
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
21
22 ## Usage
23
24 ### assets.yml
25
b59ec30 updating README
Juan José Vidal authored Dec 22, 2011
26 compress: off # default on
69d30d8 @fguillen cleaning README
authored Dec 14, 2011
27 output_path: tmp/
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
28
69d30d8 @fguillen cleaning README
authored Dec 14, 2011
29 javascripts:
30 js_package_one:
31 - test/fixtures/javascripts/one.js
32 - test/fixtures/javascripts/two.js
33 - test/fixtures/javascripts/three.js
34 js_package_two:
35 - test/fixtures/javascripts/four.js
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
36
69d30d8 @fguillen cleaning README
authored Dec 14, 2011
37 stylesheets:
38 css_package_one:
39 - test/fixtures/stylesheets/one.css
40 - test/fixtures/stylesheets/two.css
41 css_package_two:
42 - test/fixtures/stylesheets/three.css
43 - test/fixtures/stylesheets/four.css
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
44
45 ### Command Line
46
b59ec30 updating README
Juan José Vidal authored Dec 22, 2011
47 evax /path/to/assets.yml /base/path
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
48
646da27 @fguillen README
authored Apr 2, 2012
49 or, for _watchr_ mode:
50
51 evax /path/to/assets.yml /base/path -w
52
53 In _watchr_ mode if any asset file is changed the group will be recompressed authomatically.
54
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
55 ### Rails
56
57 Add **evax** to your Gemfile:
58
59 gem 'evax'
60
61 Create a Rake task for running it, e.g.:
62
63 namespace :evax do
b59ec30 updating README
Juan José Vidal authored Dec 22, 2011
64 ASSETS_PATH = "#{Rails.root}/config/assets.yml"
65 BASE_PATH = Rails.root
66
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
67 desc 'Build assets'
68 task :build do
b59ec30 updating README
Juan José Vidal authored Dec 22, 2011
69 Evax.new( ASSETS_PATH, BASE_PATH ).build
8bb13a8 README
Juan José Vidal authored Dec 12, 2011
70 end
71 end
Something went wrong with that request. Please try again.