| 194 | ; |
| 195 | |
| 196 | function addTransform (t, opts) { |
| 197 | if (typeof t === 'string' || typeof t === 'function') { |
| 198 | b.transform(opts, t); |
| 199 | } |
| 200 | else if (t && typeof t === 'object') { |
| 201 | if (!t._[0] || typeof t._[0] !== 'string') { |
| 202 | return error( |
| 203 | 'expected first parameter to be a transform string' |
| 204 | ); |
| 205 | } |
| 206 | if (opts) Object.keys(opts).forEach(function (key) { |
| 207 | t[key] = opts[key]; |
| 208 | }); |
| 209 | b.transform(t, t._.shift()); |
| 210 | } |
| 211 | else error('unexpected transform of type ' + typeof t); |
| 212 | } |
| 213 | |
| 214 | [].concat(argv.command).filter(Boolean) |
| 215 | .forEach(function (c) { |