lafikl / steady.js

A module to do some logic on the `onscroll` event without performance regressions in a @media-query like conditions.

Home Page:http://lafikl.github.io/steady.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide uglified version

simevidas opened this issue · comments

Could you hook up Uglify JS to your gulp configuration and provide a .min.js version of your library?

Sure, i'll work on it today..

I've tested on my dev machine: uglify + gzip brings the size down from 5.3 to 1.4KB :)

Awesome!

Sorry for not adding the minified version yet, but i was busy working on a new release that landed yesterday.

I'm on it now :)

Okay there's an uglify task now, just run gulp.

I didn't check the minified version in because it will cause conflict problems in the future.

Could you explain how this is performed? After installing your project (via npm or bower), do I have to perform npm install inside your project's root folder (e.g. in my case, D:/projects/my-site/bower_components/Steady.js/)?

Yeah you'll have to do it.

npm install && gulp

Gulp will produce a new file named Steady.min.js in the project root directory.

The .min.js file is not created for me :(

error

can you reinstall it, and try again please?

I just noticed, after bower install Steady.js, I get an outdated version of your gulpfile (when compared to the version here on GitHub). Do you have to publish the updates to Bower first? (I've tried bower update too).

Ok, I went with npm install steady instead and I now see the Steady.min.js file in the root :) Not sure why bower install was outdated.

I just tried to install Steady.js from bower, and it worked.

which version does it download? it should be 1.1.0

Yes, it works :) I was getting 1.0.0 for a while with bower. Not sure why.

That being said, I'm not sure what you mean by "conflict problems", but from my experience, many (if not most) repos on GitHub also provide a minified version, e.g. inside a "dist" folder (example). Not everyone is acquainted with the command line. For these users, being able to just download the minified file directly, would make all the difference.