Comments (1)
I'm also have a similar issue with my concatted/minified code. Digging into the issue, it seems that the non-minified code in oauth.js is in fact slightly minified which might be causing issues for people with task runners which minify their own and vendors code.
Taking a look into the Gruntfile.js for this project, it appears that when the Coffeescript is converted to Javascript, there is an uglify task which mangles the variables.
https://github.com/oauth-io/oauth-js/blob/master/Gruntfile.js#L56
I believe to fix the non-minified file, you can simply use the following for that task:
// Gruntfile.js
uglify: {
my_target: {
files: {
'./dist/oauth.min.js': ['dist/oauth.js']
},
options: {
compress: false,
beautify: true,
mangle: false
}
}
}
After that, bower should still be updated to use the non-minified file (See #38 ) and then people can minify the code themselves.
Edit:
After pulling down the oauth-js code and compiling it myself, it looks like the minification is done via browserify and there is no option that I can find to tell it not to minify their "preamble" as they call it.
You best bet is to make sure your minification does not attempt to modify oauth.js (or oauth.min.js if you are still using the existing version without a bower.json override (See #38)).
What is easier is if browserify has an option to not minify and then we can create a non-minified oauth.js file and import that to minify ourselves.
from oauth-js.
Related Issues (20)
- Twitter public key
- how to get your_app_public_key
- OAuth.callback return undefined in redirect mode HOT 1
- Service down HOT 3
- Apple Sign-in HOT 1
- TypeScript Support HOT 1
- Google - gender
- Get user info
- documentation lacking
- Not working with Electron
- Uncaught TypeError: Cannot read property 'User' of undefined HOT 1
- Issue running from iframe.
- get request not forwarding twitter include_email parameter HOT 2
- Not working in Chrome extension
- Error: The popup was closed HOT 15
- Error: The popup was closed (Sporadic) HOT 5
- Error: The popup has closed - have to clear cookies to make it work again
- Unable to authenticate with Google as a provider
- twitter status update issue HOT 1
- clearCache and cache:false doesn't seem to clear cache to force re-login HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth-js.