Andy Baker
Andy Baker

Reputation: 811

Adding Cordova Plugins to Platypi Project

How can I add cordova plugins to a Platypi project?

I'm starting out with the new mobile development framework Platypi.

I would like to add a Cordova plug-in to the project specifically to scan QR codes.

I've tried adding the plugin from the command line with the following command, but it errors with 'Current working directory is not a Cordova-based project.'

cordova plugin add com.phonegap.plugins.barcodescanner

Thank you.

Upvotes: 2

Views: 59

Answers (1)

wjohnsto
wjohnsto

Reputation: 4463

If you're using the CLI you can simply open the Gruntfile.js in the root project directory and add 'com.phonegap.plugins.barcodescanner' to the cordovacli:add_plugins grunt task. Then you can remove the cordova folder and run grunt setup-cordova again. Alternatively, if you've already modified your project files for cordova you can run grunt cordovacli:add_plugins to avoid overwriting anything.

Upvotes: 2

Related Questions