Skip to content

robario/cordova-hook-link-plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-hook-link-plugins

Cordova hook to add plugins as link.

Usage

Apply cordova-hook-link-plugins.

$ npm install cordova-hook-link-plugins
<!-- config.xml -->
<hook src="./node_modules/cordova-hook-link-plugins/index.js" type="before_platform_add" />

Manage cordova plugins using npm (with package.json and npm-shrinkwrap.json) in the same way as any other module.

// package.json
"dependencies": {
  "cordova-plugin-device": "0.2.1"
}
$ npm install

In config.xml, put the installed path into plugin spec.

<!-- config.xml -->
<plugin name="org.apache.cordova.core.device" spec="./node_modules/cordova-plugin-device" />

Once before_platform_add runs, there are symbolic links in the plugins folder.

$ cordova platform add browser
$ ls ./plugins/
org.apache.cordova.core.device -> ../node_modules/cordova-plugin-device/

About

Cordova hook to add plugins as link.

Resources

Stars

Watchers

Forks

Packages

No packages published