diff --git a/docs/Compiler.html b/docs/Compiler.html index 910b019..a7edfb3 100644 --- a/docs/Compiler.html +++ b/docs/Compiler.html @@ -820,6 +820,174 @@
Returns:
+ + + + +
+
+

<protected> mkdir(path, callback)

+ + +
+
+ + +
+

Recursively creates a directory containing a file specified by path.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
path + + +string + + + + +

a path to a file

callback + + +function + + + + +

a callback function

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
compiler.mkdir('/path/to/a/file', callback);
+ + +
@@ -1003,7 +1171,7 @@
Parameters:
diff --git a/docs/Compiler.js.html b/docs/Compiler.js.html index cab3080..937060b 100644 --- a/docs/Compiler.js.html +++ b/docs/Compiler.js.html @@ -159,10 +159,7 @@

Source: Compiler.js

* compiler.fsWrite('/path/to/an/output/file', data, callback); */ fsWrite(path: string, data: ProgramData, callback: () => void) { - mkdirp(dirname(path), mkdirpErr => { - if (mkdirpErr) { - return console.error(mkdirpErr); - } + this.mkdir(path, () => { writeFile(path, data.code, scriptErr => { if (scriptErr) { return console.error(scriptErr); @@ -180,6 +177,27 @@

Source: Compiler.js

}); } + /** + * Recursively creates a directory containing a file specified by `path`. + * + * @memberOf Compiler + * @instance + * @protected + * @method mkdir + * @param {string} path - a path to a file + * @param {Function} callback - a callback function + * @example + * compiler.mkdir('/path/to/a/file', callback); + */ + mkdir(path: string, callback: () => void) { + mkdirp(dirname(path), mkdirpErr => { + if (mkdirpErr) { + return console.error(mkdirpErr); + } + callback(); + }); + } + /** * Minifies and g-zips the program * diff --git a/docs/JSCompiler.html b/docs/JSCompiler.html index bf25669..c6cbea7 100644 --- a/docs/JSCompiler.html +++ b/docs/JSCompiler.html @@ -1463,6 +1463,183 @@
Example
+
+
+

<protected> mkdir(path, callback)

+ + +
+
+ + +
+

Recursively creates a directory containing a file specified by path.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
path + + +string + + + + +

a path to a file

callback + + +function + + + + +

a callback function

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
compiler.mkdir('/path/to/a/file', callback);
+ + + +
+ + +

<protected> optimize(inPath, outPath, data, callback)

@@ -1651,7 +1828,7 @@
Parameters:
diff --git a/docs/SASSCompiler.html b/docs/SASSCompiler.html index 4b8329d..2154ab1 100644 --- a/docs/SASSCompiler.html +++ b/docs/SASSCompiler.html @@ -1424,6 +1424,183 @@
Example
+
+
+

<protected> mkdir(path, callback)

+ + +
+
+ + +
+

Recursively creates a directory containing a file specified by path.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
path + + +string + + + + +

a path to a file

callback + + +function + + + + +

a callback function

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
compiler.mkdir('/path/to/a/file', callback);
+ + + +
+ + +

<protected> optimize(inPath, outPath, data, callback)

@@ -1612,7 +1789,7 @@
Parameters:
diff --git a/docs/quicksearch.html b/docs/quicksearch.html index 58962c6..3e670d0 100644 --- a/docs/quicksearch.html +++ b/docs/quicksearch.html @@ -7,7 +7,7 @@