Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version number in compiled files #259

Open
szepeviktor opened this issue Mar 10, 2014 · 12 comments
Open

version number in compiled files #259

szepeviktor opened this issue Mar 10, 2014 · 12 comments

Comments

@szepeviktor
Copy link
Contributor

Could you please include version numbers in dist files.

@szepeviktor
Copy link
Contributor Author

I've spotted version="0.8.9" in the middle of the minified.
Could it be in the comment line?
5 bytes wasted! + the space before it

@unscriptable
Copy link
Member

Hey @szepeviktor, I'm not sure what the problem is. Can you restate the problem? Thanks! -- John

@szepeviktor
Copy link
Contributor Author

When I open curl.js I cannot detect the version visually.

@szepeviktor
Copy link
Contributor Author

Could you include the version number above the MIT License line?

@unscriptable
Copy link
Member

Hey @szepeviktor,

I would gladly accept a PR for this feature. It seems that it's possible to do this in the bin/make.sh script by parsing src/curl.js for something like /version\s*=\s*['"]([^'"]*)['"]/, outputting the version comment to a temp file, and then concatenating the temp file with the usual output at the end of the file.

Interested?

-- John

@szepeviktor
Copy link
Contributor Author

Where would you insert it?
../src/curl.js ../src/curl/domReady.js ../src/curl/plugin/js.js ../src/curl/plugin/domReady.js

@szepeviktor
Copy link
Contributor Author

"at the end of the file."

@unscriptable
Copy link
Member

At the end of this file: https://github.com/cujojs/curl/blob/master/bin/make.sh#L38

@szepeviktor
Copy link
Contributor Author

I meant the version string.
#275

@szepeviktor
Copy link
Contributor Author

Were you thinking about searching ../src/curl.js hardcoded instead the compressed code?

@unscriptable
Copy link
Member

Yes, I think it is more likely that the closure compiler will change how it compresses the code than I will change how I code the version variable.

@szepeviktor
Copy link
Contributor Author

OK, hardcoding....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants