Festify / cordova-spotify-oauth

🔐 Easy Spotify authentication for Cordova / PhoneGap apps
MIT License
16 stars 18 forks source link

Browser Support #16

Closed NeoLegends closed 5 years ago

NeoLegends commented 5 years ago

Copied from email:

Hi

I have made a fork of your cordova-spotify-oauth plugin, so we can add browser support. (https://github.com/ThorvaldAagaard/cordova-spotify-oauth)

I think I have got it working, yet we need to test it and probably make some small adjustments

I have a small question, I hope you have time to answer about the plugin architecture

When I installed the plugin from my repo it failed because of a missing spotify-oauth.min.js. I can see it is generated locally but omittted in github, so can you explain how it is supposed to be generated during installation? (It is my first time building a plugin)

Best Regards

Thorvald

@ThorvaldAagaard

NeoLegends commented 5 years ago

When I installed the plugin from my repo it failed because of a missing spotify-oauth.min.js. I can see it is generated locally but omittted in github, so can you explain how it is supposed to be generated during installation? (It is my first time building a plugin)

There is a build command defined in www/package.json that builds spotify-oauth.min.js from the TypeScript sources. That file is included in the npm package that's built when our CI publishes the plugin. So to build this file for your local installation just run cd into www and run npm run build or yarn build.

ThorvaldAagaard commented 5 years ago

Thx, so using the forked repo directly without a npm-package will not build the minified file! I didn't think about that step

Currently I am installing the plugin in my Ionic-project with the command

ionic cordova plugin add https://github.com/ThorvaldAagaard/cordova-spotify-oauth.git 

and have just build the minified file locally and added it to my repo.

NeoLegends commented 5 years ago

Great! I'll close this issue then. Pull requests for browser support welcome!