auth0 / angular-lock

MIT License
18 stars 15 forks source link

Modify to work with npm/import/require and webpack. #25

Closed dopry closed 7 years ago

dopry commented 7 years ago

Allows require/import to work properly with angular-lock and removes the need to include both auth0-lock and angular-lock by setting up the package properly. This will not be loadable directly through a browser script tag any more.

if you're using a bundler like webpack, you add my repo to your package.json to test.

"dependencies": {
 "angular-lock": "https://github.com/dopry/angular-lock",
}
chenkie commented 7 years ago

Thanks for your PR :)

While I agree that this is the proper way to bring in the lib, we can't remove the ability to use it through a script tag since many people still rely on this. We need to be mindful of the fact that not everyone will be using a bundler.

That being said, I think this approach would make a good default if we can still support old fashioned script tags.

dopry commented 7 years ago

I scratched my itch. Will leave it out there for others... Very few Angular developers use script tags these days... If I were you guys I'd write for NPM/ require and bundle separately for script tags... But that's a distribution issue not a code issue. I ended up dropping all the Auth0 code altogether, and writing my own wrapper to the API... It just doesn't work with a contemporary ng1 project and the samples, modules, and versioning are super confusing and hard to follow.

On Feb 3, 2017 10:05 AM, "Ryan Chenkie" notifications@github.com wrote:

Thanks for your PR :)

While I agree that this is the proper way to bring in the lib, we can't remove the ability to use it through a script tag since many people still rely on this. We need to be mindful of the fact that not everyone will be using a bundler.

That being said, I think this approach would make a good default if we can still support old fashioned script tags.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/auth0/angular-lock/pull/25#issuecomment-277269582, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXqOAgGvY0fJrOzLiIB8TQmmeX-y0uwks5rY0HogaJpZM4L17YV .

dopry commented 7 years ago

cleaning up my PR queue.