File: commands/webfan/mkdir.js

Recommend this page to a friend!
  Classes of Till Wehowski   Widget CLI   commands/webfan/mkdir.js   Download  
File: commands/webfan/mkdir.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Widget CLI
Process commands entered by the user
Author: By
Last change: Merge remote-tracking branch 'origin/master'
Date: 7 years ago
Size: 777 bytes
 

Contents

Class file image Download
exports.finalize = function(CLI){ (function doIt(c){ c++; if(true !== frdl.fs5.polyfill.ready && 150 > c) { webfan.$Async(function(){ doIt(c); },250); return; } var fs = require('fs'); frdl.each(CLI.data.DIRECTORIES, function(i, dir){ frdl.fs5.polyfill.getFiler().cd(frdl.DIRS.AppPath); fs.mkdir(dir, '0755', function(err,dirEntry) { if(err){ console.warn(err); }else{ console.log('mdir ' + dir); } }); }); }(0)); }; exports.prepare = function(CLI){ var parse_second_arg = function(value){ CLI.data.DIRECTORIES.push(value); }; CLI.positionalSwitches[1] = parse_second_arg; };