17 lines
526 B
JavaScript
17 lines
526 B
JavaScript
var fs = require('fs');
|
|
|
|
module.exports = function(context) {
|
|
var Q = context.requireCordovaModule('q');
|
|
var deferral = new Q.defer();
|
|
console.log('copy-ff-spa-loader start');
|
|
fs.readFile('../../es5-ff-spa-loader.js',function(err,data) {
|
|
if (err) return deferral.reject(err);
|
|
fs.writeFile('www/es5-ff-spa-loader.js',data,function(err) {
|
|
if (err) return deferral.reject(err);
|
|
console.log('copy-ff-spa-loader done');
|
|
deferral.resolve();
|
|
})
|
|
});
|
|
return deferral.promise;
|
|
}
|