rm helper -r

This commit is contained in:
Liang Ding 2012-11-24 13:56:46 +08:00
parent 41c03561ac
commit dbfc858e19
2 changed files with 0 additions and 72 deletions

View File

@ -1,27 +0,0 @@
B3log Solo 皮肤工具
==================================================
PSD
------------------------------------------
存放皮肤中用到的 psd 文件
skin-preview
------------------------------------------
存放每个皮肤的预览图片。命名规则为: skinName[-pathname].png
tools
------------------------------------------
皮肤辅助工具Node.js
* compress.js
对 js, css 进行压缩后在当前目生成 XXX.min.js/css 文件
* get-static.js
提取皮肤中的 js, css, image 等静态资源到 b3log-solo-skins/helper/tools/static 目录下
* update-version.js
批量更新 skin.properties 文件中的 forSolo 版本号
------------------------------------------
平等,自由,奔放
Equality, Freedom, Passion
;-

View File

@ -1,45 +0,0 @@
var fs = require('fs'),
path = require('path');
var getAllFiles = function (root){
var res = [],
files = fs.readdirSync(root);
files.forEach(function(file){
var pathname = root+'/'+file,
stat = fs.lstatSync(pathname);
if (!stat.isDirectory()){
if (file.indexOf(".ftl") < 0 && file.indexOf(".properties") < 0
&& root.indexOf("../../helper") < 0 && root.indexOf("../../.git") < 0) {
res.push(pathname);
}
} else {
res = res.concat(getAllFiles(pathname));
}
});
return res;
};
var mkdirsSync = function(dirpath) {
if(fs.existsSync(dirpath)){
return;
}
var dirs = dirpath.split('/');
var dir = '';
for(var i = 0; i < dirs.length; i++) {
dir += dirs[i] + '/';
if(!fs.existsSync(dir)){
fs.mkdirSync(dir);
}
}
};
var skins = getAllFiles("../..");
(function () {
mkdirsSync("static");
for (var i = 0; i < skins.length; i++) {
mkdirsSync(path.dirname(skins[i].replace("../..", "static/skins")));
fs.writeFileSync(skins[i].replace("../..", "static/skins"), fs.readFileSync(skins[i]), "UTF-8");
}
})();