Closed zakmac closed 9 years ago
+1
I am making a 2.0 WIP because the whole project is overdue for a major overhaul in how it's built on my end, and all the features like the things in this PR. The problem is this Repo is just the public one, I have a private one that all the work takes place in and then I copy it here. The private repo is a mess, I need to get rid of it and do it all in the public.
So likely these changes will all be included, but not pull right into Master, I might have to piece it together and start in the WIP branch the way it needs to be for 1 repo.
@erikflowers I'm not sure what changes you've already made for v2.0.0 but this PR would likely merge without conflict –since every minor change has been tracked seperately– and now has integrated build tools. It may be able to serve as your development repo as well, assuming the delta of features is not too great.
Let me know if there's anything I can do to assist.
My biggest challenge with this project is that I am really not familiar with build tools, bower, gulpfiles, etc etc. I use Codekit to compile my Less into the final CSS, and that's it. Even adding bower support to this has been a headache since I don't know how it works, and someone asked I add it to CDNJS and I am pretty sure every update breaks that. But due to the popularity, I guess I will have to modernize my approach. If you feel qualified to help with that, that would be great.
Assuming you already have Node installed: it's as simple as pulling this repository and running npm install
, which will install all dependencies.
/gulpfile.js
is included, you can just run gulp sass
or gulp less
from your terminal while in the project's folder and they will compile the source in either /scss
or /less
into /css/weather-icons.css
.gulp mini
, which will take /css/weather-icons.css
, minify it and save a copy to /css/weather-icons.min.css
.These steps could be consolidated so that you didn't need to run gulp mini
anymore, but I was lazy and did not set things up that way.
If you do not have Node installed, it's (almost) as easy as visiting https://nodejs.org/ and clicking the big, green "Install" button. Note: Node comes bundled with npm.
Recommend to keep consistent with Bootstrap-esque naming conventions.
.wi-xlg
--> .wi-xl
.wi-xsm
--> .wi-xs
em
to match FontAwesome.gulp-sass
version to fix a known issue where glyph character codes compile to UTF-8 glyphs.I downloaded your fork and will be including this in the 2.0. I have decided to refactor the project to be a lot better in 2.0 instead of improve 1.3. I am starting the 2.0 refactor now and hope to push it out in the very near future, within the next month.
@erikflowers great news! thanks for your efforts
@zakmac Hey I am using your Sass code, and I am wondering if you know how to write the same loop that takes the variables of the icon names, and loops over that array to output the classes.
It is this that you wrote below. I'd like that in Less, since I am planning on maintaining both for now, it would make the Less half of the project so much easier.
@each $wi-glyph-name, $wi-glyph-content in $wi-icon-glyphs { .#{$wi-css-prefix}-#{$wi-glyph-name}:before { content: $wi-glyph-content; } }
@erikflowers any file in /scss/ should have a file mirroring its functionality in /less/. For example:
Oh I hadn't looked that close yet. That's great.
Just having that automated loop for the class names energizes me. Not having to update things in 4 places is a huge time saver.
I'm recomposing everything in the 2.0-wip right now. You did a ton of work I am realizing. I'll be layer it in to the WIP as I go, so everything should make it in in one form or another. Some of what you've done is outside my real technical understanding, so I might have to study it a bit. The key value pairs in less and sass is new to me and such a huge improvement.
I will be exploring a way to do that for the HTML as well, since that is updated manually each time for the GH-Pages html, and also the cheatsheet. Really they should all just use the same array instead of having me do this total manual process to update it. I do it in Jade right now, not sure if Jade can build it dynamically or if another language could be used to compile to HTML so I don't have to manually update every page every time.
I've taken almost all of this in and included it in 2.0 somewhere, so I am going to close this request. Tons of thanks, this was a huge help!!!
This PR rectifies the following:
7, #24, #53 - Add support for Weather codes
18 - Yahoo Weather
61, #65 - OpenWeatherMap
56 - Forecast.io
extend()
. As such the bundled CSS is now built using the SASS code base in order to enable code mappings for CSS users.35, #37, #60 - SASS styling
45 - Beaufort Wind Scale spelling
50 - Fixed width class
This PR contains the following changes:
gulpfile.js
with the following tasks:sass
- compiles SASS source and outputs to./css/
less
- compiled LessCSS source and outputs to./css/
mini
- minifies./css/weather-icons.css
and outputs to./css/weather-icons.min.css
font-family
is no longer customizable and is locked toWeatherIcon
.wi-wind-default_*-deg
.wi-rotate-*
.wind-beafort-*
has been renamed.wind-beaufort-*
to rectify a typo.direction-
.down
becomes.direction-down
.down-left
becomes.direction-down-left
.down-right
becomes.direction-down-right
.left
becomes.direction-left
.right
becomes.direction-right
.up
becomes.direction-up
.up-left
becomes.direction-up-left
.up-right
becomes.direction-up-right