diff --git a/src/plugins/file.ts b/src/plugins/file.ts index 3d4d6c162..1af744db7 100644 --- a/src/plugins/file.ts +++ b/src/plugins/file.ts @@ -337,12 +337,6 @@ declare var FileError: { PATH_EXISTS_ERR: number; }; -let pluginMeta = { - name: 'File', - plugin: 'cordova-plugin-file', - pluginRef: 'cordova.file', - repo: 'https://github.com/apache/cordova-plugin-file' -}; /** * @name File @@ -365,7 +359,12 @@ let pluginMeta = { * Although most of the plugin code was written when an earlier spec was current: http://www.w3.org/TR/2011/WD-file-system-api-20110419/ * It also implements the FileWriter spec : http://dev.w3.org/2009/dap/file-system/file-writer.html */ -@Plugin(pluginMeta) +@Plugin({ + name: 'File', + plugin: 'cordova-plugin-file', + pluginRef: 'cordova.file', + repo: 'https://github.com/apache/cordova-plugin-file' +}) export class File { static cordovaFileError: {} = { 1: 'NOT_FOUND_ERR', @@ -391,7 +390,10 @@ export class File { static getFreeDiskSpace(): Promise { return new Promise((resolve, reject) => { if (!cordova || !cordova.exec) { - pluginWarn(pluginMeta); + pluginWarn({ + name: 'File', + plugin: 'cordova-plugin-file' + }); reject({ error: 'plugin_not_installed' }); } else { cordova.exec(resolve, reject, 'File', 'getFreeDiskSpace', []);