2
0
Fork 0

renamed cssData to dss

This commit is contained in:
Willem 2016-03-14 00:52:48 +01:00
parent 43d9f243d8
commit 0f7e2c9866
2 changed files with 11 additions and 10 deletions

View file

@ -13,7 +13,7 @@ A javascript library providing server defined loading of assets for a single pag
* Assets caching for offline use. * Assets caching for offline use.
* Assets hashing for fast syncing. * Assets hashing for fast syncing.
* Assets types: js,css,cssData * Assets types: js,css,dss
* Caching backends: localStorage,webSqlDB,sqllite,none * Caching backends: localStorage,webSqlDB,sqllite,none
* Server url question ui. * Server url question ui.
* Loader error ui. * Loader error ui.
@ -60,7 +60,7 @@ A javascript library providing server defined loading of assets for a single pag
}, },
{ {
"url": "/static/css/more-asset-data.css", "url": "/static/css/more-asset-data.css",
"type": "cssData", "type": "dss",
"hash": 1371811412 "hash": 1371811412
}, },
] ]
@ -110,7 +110,7 @@ A javascript library providing server defined loading of assets for a single pag
* cache.meta = The cache backend for the meta information(server.url+content), null is auto select,false is disable. (default: null) * cache.meta = The cache backend for the meta information(server.url+content), null is auto select,false is disable. (default: null)
* cache.js = The cache backend for for js, null is auto select,false is disable. (default: null) * cache.js = The cache backend for for js, null is auto select,false is disable. (default: null)
* cache.css = The cache backend for for css, null is auto select,false is disable. (default: null) * cache.css = The cache backend for for css, null is auto select,false is disable. (default: null)
* cache.cssData = The cache backend for for cssData, null is auto select,false is disable. (default: null) * cache.dss = The cache backend for for dss, null is auto select,false is disable. (default: null)
## Functions ## Functions
@ -138,7 +138,7 @@ A javascript library providing server defined loading of assets for a single pag
* meta = Stores the server url and server assets. * meta = Stores the server url and server assets.
* js = Store application javascript data. * js = Store application javascript data.
* css = Stores application css data. * css = Stores application css data.
* cssData = Stores application css large data like base64 fonts/svg/etc. * dss = Stores application css large data like base64 fonts/svg/etc.
## Cache Config ## Cache Config
@ -154,11 +154,11 @@ A javascript library providing server defined loading of assets for a single pag
FFSpaLoader.options.cache.meta = false; FFSpaLoader.options.cache.meta = false;
FFSpaLoader.options.cache.js = false; FFSpaLoader.options.cache.js = false;
FFSpaLoader.options.cache.css = false; FFSpaLoader.options.cache.css = false;
FFSpaLoader.options.cache.cssData = false; FFSpaLoader.options.cache.dss = false;
if (FFSpaLoader.factory.detect.localStorage()) { if (FFSpaLoader.factory.detect.localStorage()) {
FFSpaLoader.options.cache.css = FFSpaLoader.factory.cache.localStorage(); FFSpaLoader.options.cache.css = FFSpaLoader.factory.cache.localStorage();
FFSpaLoader.options.cache.cssData = FFSpaLoader.factory.cache.localStorage(); FFSpaLoader.options.cache.dss = FFSpaLoader.factory.cache.localStorage();
} }
FFSpaLoader.options.server.url = 'http://myserver'; FFSpaLoader.options.server.url = 'http://myserver';
FFSpaLoader.options.server.assets = '/api/path/to/spa/client/resources'; FFSpaLoader.options.server.assets = '/api/path/to/spa/client/resources';
@ -200,7 +200,7 @@ A javascript library providing server defined loading of assets for a single pag
* test in production * test in production
* Add instance websql options so it can also be used in application code. * Add instance websql options so it can also be used in application code.
* Split assets per type so do js first then boot then css + cssData. * Split assets per type so do js first then boot then css + dss.
* Add more tests * Add more tests
* css: set tag.media = 'only you'; * css: set tag.media = 'only you';
* css: add media in resouces * css: add media in resouces
@ -222,6 +222,7 @@ Add unit tests for any new or changed functionality. Lint and test your code.
* Added response header check support. * Added response header check support.
* Added json accept header on assets resources list. * Added json accept header on assets resources list.
* Added cb errors on assets resources json parse + result obj. * Added cb errors on assets resources json parse + result obj.
* Renamed cssData type to dss for enum easiness.
### 0.1.1 ### 0.1.1
* Moved websql delete timeout to cleanServerlUrl for faster boot. * Moved websql delete timeout to cleanServerlUrl for faster boot.

View file

@ -118,7 +118,7 @@
meta: null, meta: null,
js: null, js: null,
css: null, css: null,
cssData: null dss: null
} }
}; };
@ -526,7 +526,7 @@
var injectResourceData = function(resource, data, cb) { var injectResourceData = function(resource, data, cb) {
utilDebug('injectResourceData resource '+JSON.stringify(resource)+' data '+data.length); utilDebug('injectResourceData resource '+JSON.stringify(resource)+' data '+data.length);
var tag = null; var tag = null;
if (resource.type === 'css' || resource.type === 'cssData') { if (resource.type === 'css' || resource.type === 'dss') {
tag = document.createElement('style'); tag = document.createElement('style');
tag.type = 'text/css'; tag.type = 'text/css';
} }
@ -980,7 +980,7 @@
if (err !== null) { return cb(err); } if (err !== null) { return cb(err); }
startCacheType('css', function(err) { startCacheType('css', function(err) {
if (err !== null) { return cb(err); } if (err !== null) { return cb(err); }
startCacheType('cssData', cb); startCacheType('dss', cb);
}); });
}); });
}); });