var path = require('path');
var fs = require('fs');
var async = require('async');
function getFiles (dirPath, callback) {
fs.readdir(dirPath, function (err, files) {
if (err) return callback(err);
var filePaths = [];
async.eachSeries(files, function (fileName, eachCallback) {
var filePath = path.join(dirPath, fileName);
fs.stat(filePath, function (err, stat) {
if (err) return eachCallback(err);
if (stat.isDirectory()) {
getFiles(filePath, function (err, subDirFiles) {
if (err) return eachCallback(err);
filePaths = filePaths.concat(subDirFiles);
eachCallback(null);
});
} else {
if (stat.isFile() && /\.js$/.test(filePath)) {
filePaths.push(filePath);
}
eachCallback(null);
}
});
}, function (err) {
callback(err, filePaths);
});
});
}
getFiles('./', function (err, files) {
console.log(err || files);
});
%date:~6,4%-%date:~3,2%-%date:~0,2%
@echo off
echo ------ determine date
forfiles /P backup.logon /C "cmd /c DEL @path" /D -5
SET DT=%date:~6,4%.%date:~3,2%.%date:~0,2%
IF EXIST C:\Tools\backup.logon\%DT%.done GOTO DONE
...
:DONE
echo %DT% %TIME% >> C:\Tools\backup.logon\%DT%.done
echo ------ execution completed
echo %date:~6,4%-%date:~3,2%-%date:~0,2%|clip
В буфер обмена. "emmet.syntaxProfiles": {
"html": {
"filters": "html, bem"
}
},
"emmet.preferences": {
"bem.elementSeparator": "__",
"bem.modifierSeparator": "--",
"bem.shortElementPrefix": "-",
"lorem.defaultLang": "en"
},
filter.commentTrigger:
- list of attributes that should trigger comment output. Default value is id, class
"emmet.preferences": {
"filter.commentBefore": "<!-- [#ID][.CLASS] -->\n",
"filter.commentAfter": "\n<!-- [#ID][.CLASS] end -->"
},
"emmet.syntaxProfiles": {
"html" : {
"filters" : "html, c"
}
},