update version 0.5.5 to 0.5.6
This commit is contained in:
parent
70f3148608
commit
a1abd17ae2
@ -8,7 +8,8 @@ B3log Solo 官方皮肤
|
||||
|
||||
--------------------------------------------------------------
|
||||
|
||||
每个皮肤单独存放于根目录下以该皮肤名称为名的文件夹中。其中 skin-preview 中存放皮肤的预览图片。
|
||||
每个皮肤单独存放于根目录下以该皮肤名称为名的文件夹中。
|
||||
其中 skin-preview 存放皮肤的预览图片,toolers 存放更新版本和压缩 js、css 的 NodeJS 脚本。
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -22,5 +22,5 @@
|
||||
|
||||
name=Andrea
|
||||
version=2.0.5
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=Refers to http://www.madeincima.eu
|
@ -23,5 +23,5 @@
|
||||
|
||||
name=\u7ecf\u5178\u6de1\u84dd
|
||||
version=2.0.5
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=\u8fd9\u4e2a\u76ae\u80a4\u5f88\u4e11\u4e48\uff1f\u6211\u52d2\u4e2a\u53bb\u3002
|
||||
|
@ -22,5 +22,5 @@
|
||||
|
||||
name=Community
|
||||
version=2.0.5
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=Refers to http://demo.woothemes.com/skeptical/
|
@ -23,5 +23,5 @@
|
||||
|
||||
name=ease
|
||||
version=1.0.3
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=\u56de\u5f52\u606c\u9759
|
||||
|
@ -23,5 +23,5 @@
|
||||
|
||||
name=favourite
|
||||
version=2.0.5
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=Refers to http://www.iprimidieci.com/
|
@ -22,5 +22,5 @@
|
||||
|
||||
name=i-nove
|
||||
version=2.0.5
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=Refers to http://demo.neoease.com
|
@ -22,5 +22,5 @@
|
||||
|
||||
name=Mobile
|
||||
version=0.1.4
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=\u8bf7\u4e0d\u8981\u4ece\u90e8\u7f72\u76ee\u5f55\u4e2d\u5220\u9664\u8be5\u76ae\u80a4\uff0c\u5426\u5219\u79fb\u52a8\u8bbe\u5907\u8bbf\u95ee\u65f6\u535a\u5ba2\u5c06\u4e0d\u53ef\u7528\u3002
|
||||
|
@ -22,5 +22,5 @@
|
||||
|
||||
name=NeoEase
|
||||
version=1.0.5
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=http://www.neoease.com/
|
||||
|
@ -22,5 +22,5 @@
|
||||
|
||||
name=owmx-3.0
|
||||
version=2.0.5
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=Refers to http://lightdian.b3log.org
|
55
toolers/compress.js
Normal file
55
toolers/compress.js
Normal file
@ -0,0 +1,55 @@
|
||||
var fs = require("fs"),
|
||||
path = require('path'),
|
||||
exec = require("child_process").exec;
|
||||
|
||||
var getCompressFiles = function (root) {
|
||||
var res = [],
|
||||
files = fs.readdirSync(root);
|
||||
|
||||
files.forEach(function(file) {
|
||||
var pathname = root + '/' + file,
|
||||
stat = fs.lstatSync(pathname);
|
||||
|
||||
if (!stat.isDirectory()) {
|
||||
if (pathname.indexOf("mobile") < 0 && path.basename(pathname).indexOf(".min") < 0) {
|
||||
if (path.dirname(pathname).indexOf("css") > -1) {
|
||||
res.push("css-" + pathname);
|
||||
}
|
||||
|
||||
if (path.dirname(pathname).indexOf("js") > -1) {
|
||||
res.push("js-" + pathname);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
res = res.concat(getCompressFiles(pathname));
|
||||
}
|
||||
});
|
||||
return res;
|
||||
};
|
||||
|
||||
(function () {
|
||||
var compressFiles = getCompressFiles("..");
|
||||
|
||||
for (var i = 0; i < compressFiles.length; i++) {
|
||||
// skin js compress
|
||||
if (compressFiles[i].indexOf("js-") > -1) {
|
||||
var pathname = compressFiles[i].split("js-")[1];
|
||||
console.log("compress js:" + pathname);
|
||||
exec("uglifyjs " + pathname + " > " + path.dirname(pathname) + "/" + path.basename(pathname, ".js") + ".min.js", function (error, stdout, stderr) {
|
||||
if (error !== null) {
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
// skin css compress
|
||||
if (compressFiles[i].indexOf("css-") > -1) {
|
||||
var pathname = compressFiles[i].split("css-")[1];
|
||||
console.log("compress css:" + pathname);
|
||||
exec("lessc -compress " + pathname + " > " + path.dirname(pathname) + "/" + path.basename(pathname, ".css") + ".min.css", function (error, stdout, stderr) {
|
||||
if (error !== null) {
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
42
toolers/update-version.js
Normal file
42
toolers/update-version.js
Normal file
@ -0,0 +1,42 @@
|
||||
var version = "",
|
||||
newVersion = "";
|
||||
|
||||
process.argv.forEach(function (val, index) {
|
||||
if (index === 2) {
|
||||
version = val;
|
||||
}
|
||||
|
||||
if (index === 3) {
|
||||
newVersion = val;
|
||||
}
|
||||
});
|
||||
|
||||
var fs = require("fs"),
|
||||
path = require('path');
|
||||
var getPropertiesFiles = function (root) {
|
||||
var res = [],
|
||||
files = fs.readdirSync(root);
|
||||
|
||||
files.forEach(function (file) {
|
||||
var pathname = root + '/' + file,
|
||||
stat = fs.lstatSync(pathname);
|
||||
|
||||
if (!stat.isDirectory()) {
|
||||
if (path.basename(pathname) === "skin.properties") {
|
||||
res.push(pathname);
|
||||
}
|
||||
} else {
|
||||
res = res.concat(getPropertiesFiles(pathname));
|
||||
}
|
||||
});
|
||||
return res;
|
||||
};
|
||||
|
||||
(function () {
|
||||
var skins = getPropertiesFiles("..");
|
||||
|
||||
for (var i = 0; i < skins.length; i++) {
|
||||
var file = fs.readFileSync(skins[i], "UTF-8");
|
||||
fs.writeFileSync(skins[i], file.replace("forSolo=" + version, "forSolo=" + newVersion), "UTF-8");
|
||||
}
|
||||
})();
|
@ -22,5 +22,5 @@
|
||||
|
||||
name=Tree House
|
||||
version=2.0.5
|
||||
forSolo=0.5.5
|
||||
forSolo=0.5.6
|
||||
memo=Refers to http://www.thepixel.com/blog
|
Loading…
x
Reference in New Issue
Block a user