Skip to content

Commit 97f3456

Browse files
committed
jump to v0.6.0
1 parent e40361d commit 97f3456

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

README.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ b.plugin('browserify-bower', {
2626
external: {
2727
exclude: ['comp1', 'comp2']
2828
},
29-
alias: ['base62/lib/base62:base62']
29+
alias: ['base62/lib/base62:base62'], // or alias: { 'base62/lib/base62':'base62', ... }
30+
mainfiles: { // specify the main file for packages without a bower.json
31+
'base62': 'main.js'
32+
}
3033
});
3134
```
3235
_p.s. of course, you can also configure this in node `package.json`._
@@ -67,23 +70,8 @@ In programmatic API, pls use like `b.plugin(browserifyBower.workdir(thedir), {..
6770
In command line, pls use parameter `--workdir thedir`.
6871

6972

70-
> p.s. feel free to use it side by other plugins/transforms, since it's a standard [`browserify`](https://github.com/substack/node-browserify) plugin, no hack, no change to your codes.
73+
> p.s. pls feel free to use it side by other plugins/transforms, since it's a standard [`browserify`](https://github.com/substack/node-browserify) plugin, no hack, no change to your codes.
7174
72-
# options
73-
![browserify-bower config](https://raw.githubusercontent.com/tminglei/browserify-bower/master/doc/browserify-bower-config.png)
74-
75-
**action:** _string_, guide `browserify-bower` to **require**/**external** specified bower components; available values: `require` | `external`, default `require`
76-
77-
**action config:** _string array or map object_, available config items: `include` | `exclude` | `alias`, examples:
78-
a) `['name1', 'name2', ...]` _(p.s. will be treated as `{ include: [name1, name2, ...] }`)_
79-
b) `{ exclude: ['comp5', 'comp7'], alias: ['comp1:alias1'] }`
80-
81-
_Notes: `name` format: `name[:alias]`, and name can be component name or submodule like 'base62/lib/base62'._
82-
83-
#### _Additional Rules:_
84-
- if options undefined, `{ require: [all bower dependency names] }` will be used
85-
- if options..include undefined, `[all bower dependency names]` will be used
86-
- if both include/exclude and alias declared an alias for a component, declaration in alias will be used
8775

8876
# run test
8977
_You need ensure related node modules (for `browserify-bower`) and bower components (for test codes) installed, then run `npm test`._
@@ -127,6 +115,10 @@ _(p.s. in fact, browserify-bower's test codes were copied and modified from `deb
127115

128116

129117
# history
118+
v0.6.0 (9-Aug-2015):
119+
1) add mainfiles option, which allows specification of the main file for packages without a bower.json
120+
2) enhancement: alias configs under options or 'require'/'external', can be also `{ name: alias, ... }`, except `['name:alias', ...]`
121+
130122
v0.5.0 (24-July-2015):
131123
1) allow alias to be configured from an sibling node of 'require'/'external', too
132124
2) enhancement: if an item existed in both 'require' and 'external' lists, let's remove it from 'require' list

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "browserify-bower",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"description": "a browserify plugin, to enable you require bower components just like node modules",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)