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:54:03 UTC

[cordova-browser] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/cordova-browser.git


The following commit(s) were added to refs/heads/master by this push:
     new 1f0cfb7  CB-13216 Properly install plugin assets
1f0cfb7 is described below

commit 1f0cfb741025d4a5cc89c498878a0b8cca2816ba
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