Skip to content

Commit 0d63f0d

Browse files
author
Arthur Mogliev
committed
Added few more documentation tips
1 parent 408b79d commit 0d63f0d

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,42 @@ and switch them via template map but that feels a bit awkward. This module solve
1515
First of all you need to find and get all Bower packages that your application requires using either
1616
[Bower](http:/bower.io) itself or its substitute [Bowerphp](http://bowerphp.org/) or any other way you prefer.
1717
Then you need to set `bower.bower_folder.os` setting in your configuration - it should point to `bower_components` folder
18-
where you have just installed all packages. By default it is suppoused to be located inside ZF2 application root.
18+
where you have just installed all packages. By default it is supposed to be located inside ZF2 application root.
1919

2020
## Declare packs of Bower packages
2121

2222
Next you need to declare packs of Bower packages you want to use. Each pack is a collection of Bower packages
23-
which you want ot have in both combined (for deploying) and separated (for debugging) states. To do that you need to set:
23+
which you want to have in both combined (for deploying) and separated (for debugging) states. To do that you need to set:
2424

2525
* `bower.pack_folder.os` - filesystem folder where all pack files should be located
2626
* `bower.pack_folder.web` - web path to access all pack files
2727
* `bower.debug_folder.os` - filesystem folder where all debug package files should be located
2828
* `bower.debug_folder.web` - web path to access all debug package files
2929
* `bower.packs.<pack name>.modules` - Bower packages names to form a pack
30-
30+
* `bower.packs.<pack name>.token` - string that will be appended to file path of the pack (to force browser to reload)
31+
* `bower.debug_mode` - flag that determines if you are currently debugging your app and want each pack content in separate files
32+
33+
Most configuration options have default values (check `config/module.config.php` for details), so the only thing
34+
you have to declare in your ZF2 app config is something like this (sample is in YAML just to make it easier to read):
35+
36+
bower:
37+
debug_mode: false
38+
packs:
39+
main:
40+
token: 'f22f0d9703c2ef8dc9cc14f6286ee302'
41+
modules:
42+
- jquery-form
43+
- jquery.mousewheel
44+
- jquery.jscrollpane
45+
- angular
46+
- angular-animate
47+
- angular-messages
48+
- angular-ui-router
49+
admin:
50+
modules:
51+
- jquery
52+
- angular
53+
- bootstrap
3154

3255
Beware of hidden dependencies between packages: module does its best to detect package dependencies
3356
from `bower.json` files but some of them are not declared there (like between `jquery.mousewheel` and `jquery.scrollpane`).

0 commit comments

Comments
 (0)