Publishing Ionic wrapper for Cordova plugin

418 Views Asked by At

Is there a way to create Ionic wrapper for Cordova plugin other than publishing it to awesome-cordova-plugins repository like described at https://github.com/danielsogl/awesome-cordova-plugins/blob/master/DEVELOPER.md

I would like to store all needed files in the same repository as my Cordova plugin.

My question is how to create those files. For awesome-cordova-plugins I run npm run build to get the following files in dist folder:

./ngx/index.js
./ngx/index.d.ts
./ngx/index.metadata.json
./index.js
./index.d.ts

When trying to build a main project with Cordova plugin I get an error:

[error] Error: The target entry-point "@ionic-native/zebra-printer" has missing dependencies:

@angular/core
@ionic-native/core

Cordova plugin repository can be found here: https://github.com/a-services/cordova-zebra-printer

1

There are 1 best solutions below

1
kunal shaktawat On

You have to first install

npm install @awesome-cordova-plugins/core --save //once per project - for details click here .