1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-24 02:38:15 +04:00

unused components, stars, new components, commits list

This commit is contained in:
codecalm
2019-11-28 20:21:14 +01:00
parent 17825ca39e
commit d54053ff0a
57 changed files with 1120 additions and 893 deletions

27
build/unused-files.js Normal file
View File

@@ -0,0 +1,27 @@
const glob = require("glob"),
fs = require("fs");
let foundFiles = [];
glob.sync("pages/**/*.{html,md}").forEach(function (file) {
let fileContent = fs.readFileSync(file);
fileContent.toString().replace(/\{% include(_cached)? ([a-z0-9\/_-]+\.html)/g, function(f, c, filename){
filename = 'pages/_includes/' + filename;
if(!foundFiles.includes(filename)) {
foundFiles.push(filename);
}
});
});
let includeFiles = glob.sync("pages/_includes/**/*.html");
includeFiles.forEach(function(file){
if(! foundFiles.includes(file)) {
console.log('file', file);
}
});
// console.log('foundFiles', foundFiles);
// console.log('includeFiles', includeFiles);