mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 10:09:04 +00:00
feature(minify) rm setAllowed
This commit is contained in:
parent
7ac3b1d564
commit
948dfcab59
3 changed files with 19 additions and 54 deletions
28
cloudcmd.js
28
cloudcmd.js
|
|
@ -166,25 +166,17 @@
|
|||
|
||||
function readConfig(pCallBack) {
|
||||
fs.readFile(CONFIG_PATH, function(pError, pData) {
|
||||
var msg, status;
|
||||
if (!pError) {
|
||||
status = 'ok';
|
||||
|
||||
var lStr = pData.toString(),
|
||||
lReadedConf = Util.parseJSON(lStr);
|
||||
|
||||
if (!Config.minify)
|
||||
main.config = Config = lReadedConf;
|
||||
|
||||
Util.tryCatchLog(function() {
|
||||
Config.minify = lReadedConf.minify;
|
||||
Config.cache = lReadedConf.cache;
|
||||
|
||||
Minify.setAllowed(Config.minify);
|
||||
});
|
||||
}
|
||||
else
|
||||
var msg, status, str, readed;
|
||||
|
||||
if (pError)
|
||||
status = 'error';
|
||||
else {
|
||||
status = 'ok';
|
||||
str = pData.toString(),
|
||||
readed = Util.parseJSON(str);
|
||||
|
||||
main.config = Config = readed;
|
||||
}
|
||||
|
||||
msg = CloudFunc.formatMsg('read', 'config', status);
|
||||
Util.log(msg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue