mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 10:38:26 +00:00
refactored
This commit is contained in:
parent
7673b7d32d
commit
5c6fcfddcc
4 changed files with 73 additions and 102 deletions
14
cloudcmd.js
14
cloudcmd.js
|
|
@ -11,12 +11,12 @@
|
|||
path = main.path,
|
||||
fs = main.fs,
|
||||
CloudFunc = main.cloudfunc,
|
||||
AppCache = main.appcache,
|
||||
Util = main.util,
|
||||
update = main.update,
|
||||
|
||||
Server = main.require(LIBDIR + 'server'),
|
||||
Minify = Server.Minify,
|
||||
srv = Server.CloudServer,
|
||||
Minify = main.minify,
|
||||
Config = main.config,
|
||||
|
||||
REQUEST = 'request',
|
||||
|
|
@ -30,7 +30,6 @@
|
|||
readConfig();
|
||||
Server.start(Config, {
|
||||
appcache : appCacheProcessing,
|
||||
index : indexProcessing,
|
||||
minimize : minimize,
|
||||
rest : rest,
|
||||
route : route
|
||||
|
|
@ -81,16 +80,15 @@
|
|||
* init and process of appcache if it allowed in config
|
||||
*/
|
||||
function appCacheProcessing(){
|
||||
var lAppCache = srv.AppCache,
|
||||
lFiles = [
|
||||
var lFiles = [
|
||||
{'//themes.googleusercontent.com/static/fonts/droidsansmono/v4/ns-m2xQYezAtqh7ai59hJUYuTAAIFFn5GTWtryCmBQ4.woff' : './font/DroidSansMono.woff'},
|
||||
{'//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js' : './lib/client/jquery.js'}];
|
||||
|
||||
if(srv.Minify._allowed.css)
|
||||
if(Config.minification.css)
|
||||
lFiles.push('node_modules/minify/min/all.min.css');
|
||||
|
||||
lAppCache.addFiles(lFiles);
|
||||
lAppCache.createManifest();
|
||||
AppCache.addFiles(lFiles);
|
||||
AppCache.createManifest();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue