@@ -24,13 +24,13 @@ var remove = Q.denodeify(fs.remove);
24
24
*
25
25
* 1. Copies everything from [bit-docs-generate-html/site/default/static] to
26
26
* [bit-docs-generate-html/site/static/build/buildHash].
27
- *
27
+ *
28
28
* 2. Copies the path in `options.dest` to
29
29
* [bit-docs-generate-html/site/static/build/buildHash].
30
- *
30
+ *
31
31
* 3. `require`s the "build" module at
32
32
* [bit-docs-generate-html/site/static/build/buildHash/build.js].
33
- *
33
+ *
34
34
* 4. Calls that "build" module function with the options and returns the
35
35
* result.
36
36
*
@@ -43,13 +43,13 @@ var remove = Q.denodeify(fs.remove);
43
43
*
44
44
* @option {Boolean} [forceBuild=false] If set to `true`, rebuilds the static
45
45
* bundle even if it has already been built.
46
- *
46
+ *
47
47
* @option {String} dest The final destination output of the static
48
48
* distributable.
49
49
*
50
50
* @option {String} static The location of static content used to overwrite or
51
51
* add to the default static content.
52
- *
52
+ *
53
53
* @option {Boolean} [minifyBuild=true] If set to `false` the build will not be
54
54
* minified. This behavior should be implemented by the "build" module.
55
55
*
@@ -167,7 +167,7 @@ function installPackages(options, buildFolder, distFolder, hash){
167
167
if ( options . debug ) {
168
168
console . log ( "BUILD: Getting build module" ) ;
169
169
}
170
-
170
+
171
171
var build = require ( "../site/static/build/" + hash + "/build.js" ) ;
172
172
return build ( options , {
173
173
dist : distFolder ,
@@ -178,7 +178,9 @@ function installPackages(options, buildFolder, distFolder, hash){
178
178
179
179
function callIfFunction ( value ) {
180
180
if ( typeof value === "function" ) {
181
- value ( ) ;
181
+ try {
182
+ value ( ) ;
183
+ } catch ( e ) { }
182
184
}
183
185
return value ;
184
186
}
0 commit comments