You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2017/08/25 20:55:32 UTC
[cordova-browser] branch 5.0.x updated: CB-13216 Properly install
plugin assets
This is an automated email from the ASF dual-hosted git repository.
steven pushed a commit to branch 5.0.x
in repository https://gitbox.apache.org/repos/asf/cordova-browser.git
The following commit(s) were added to refs/heads/5.0.x by this push:
new 6e9cb1f CB-13216 Properly install plugin assets
6e9cb1f is described below
commit 6e9cb1f7c6207f176707b9ddb05c2c87c87027d3
Author: Alexander Sorokin <al...@akvelon.com>
AuthorDate: Fri Aug 25 14:39:40 2017 +0300
CB-13216 Properly install plugin assets
This closes #42
---
bin/template/cordova/browser_handler.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/bin/template/cordova/browser_handler.js b/bin/template/cordova/browser_handler.js
index cd20489..6e732c7 100644
--- a/bin/template/cordova/browser_handler.js
+++ b/bin/template/cordova/browser_handler.js
@@ -111,5 +111,20 @@ module.exports = {
uninstall: function (obj, project_dir, plugin_id, options) {
events.emit('verbose', 'lib-file.uninstall is not supported for browser');
}
+ },
+ asset: {
+ install: function (asset, plugin_dir, wwwDest) {
+ var src = path.join(plugin_dir, asset.src);
+ if (fs.statSync(src).isDirectory()) {
+ src = path.join(src, '*');
+ }
+ var dest = path.join(wwwDest, asset.target);
+
+ shell.cp('-rf', src, dest);
+ },
+ uninstall: function (asset, wwwDest, plugin_id) {
+ shell.rm('-rf', path.join(wwwDest, asset.target));
+ shell.rm('-rf', path.join(wwwDest, 'plugins', plugin_id));
+ }
}
};
--
To stop receiving notification emails like this one, please contact
['"commits@cordova.apache.org" <co...@cordova.apache.org>'].
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org