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 min.js file #30

Closed
peterbe opened this issue May 18, 2015 · 7 comments
Closed

Version number in min.js file #30

peterbe opened this issue May 18, 2015 · 7 comments
Labels

Comments

@peterbe
Copy link

peterbe commented May 18, 2015

I have no idea which version I installed last time. All I know is that bower found and downloaded version 1.2.2.

It would be awesome if the version number could be inserted as a comment on the first line of the dist/layzr.min.js.

Autocompeter does this using gulp-header.

@callmecavs
Copy link
Owner

going to do some surveying of other prominent JS libs (not to say that mine is prominent haha) and try to follow the industry best practice on this one.

if you have some examples of other libs that include a comment indicating version or otherwise in the minified file, i'd appreciate you linking them. thanks for the gulp plugin recommendation as well

@peterbe
Copy link
Author

peterbe commented May 20, 2015

Other libs other than autocompeter?
I don't think it matters. Where you get the version number from might vary but that gulpfile is a great example of how you're supposed to get it in there.

@peterbe
Copy link
Author

peterbe commented May 20, 2015

Oh, another thing you should consider is to NOT work on a file in the dist/ directory. That directory is usually meant for computer generated things.

In Autocompeter I work on the files in src/ and my gulpfile.js creates the files in dist/.

@callmecavs
Copy link
Owner

what i was asking was: do major js libraries include version numbers in their minified versions? i'd like to follow their lead - based on what i'm seeing, it looks like they do, and so i've added this to the roadmap.

completely see your point about the src folder. an added benefit would be using something like gulp-umd to add the UMD wrapper, to keep that ugliness out of the source file.

both changes coming later today, thanks dude!

@peterbe
Copy link
Author

peterbe commented May 20, 2015

Examples:

Yeah, I didn't know about gulp-umd but that's a really good point!

@callmecavs
Copy link
Owner

yep, seems to be standard. thanks man, will update you when i make some changes later today

@callmecavs
Copy link
Owner

@peterbe fixed the repo folder structure (added the src folder, dist folder is only processed output) in the new release, v1.3.0. part of this fix was adding a comment to the top of both dist files that includes version number. thanks again for the help bud, gulp-header proved the best way to go about it

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

No branches or pull requests

2 participants