2
0
Fork 0
es5-ff-spa-loader/example/app_mobile/scripts/copy-ff-spa-loader-css.js

22 lines
551 B
JavaScript
Raw Normal View History

2016-01-24 20:38:21 +00:00
var fs = require('fs');
var logger = require('console');
2016-01-24 20:38:21 +00:00
module.exports = function(context) {
var Q = context.requireCordovaModule('q');
var deferral = new Q.defer();
logger.log('copy-ff-spa-loader-css start');
fs.readFile('../../es5-ff-spa-loader.css',function(err,data) {
if (err) {
return deferral.reject(err);
}
fs.writeFile('www/es5-ff-spa-loader.css',data,function(err) {
if (err) {
return deferral.reject(err);
}
logger.log('copy-ff-spa-loader-css done');
deferral.resolve();
})
});
return deferral.promise;
2016-01-24 20:38:21 +00:00
}