Skip to content

Commit

Permalink
Generate Less files from the icons object
Browse files Browse the repository at this point in the history
  • Loading branch information
robmadole committed May 23, 2013
1 parent ce8d414 commit fd0a94b
Show file tree
Hide file tree
Showing 15 changed files with 134 additions and 3,352 deletions.
59 changes: 30 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
*.pyc
*.egg-info
*.db
*.db.old
*.swp
*.db-journal

.coverage
.DS_Store
.installed.cfg
_gh_pages/*

.idea/*
.svn/*
src/website/static/*
src/website/media/*

bin
cfcache
develop-eggs
dist
downloads
eggs
parts
tmp
.sass-cache

src/website/settingslocal.py
stunnel.log
*.pyc
*.egg-info
*.db
*.db.old
*.swp
*.db-journal

.coverage
.DS_Store
.installed.cfg
_gh_pages/*

.idea/*
.svn/*
src/website/static/*
src/website/media/*

bin
cfcache
develop-eggs
dist
downloads
eggs
parts
tmp
.sass-cache
node_modules

src/website/settingslocal.py
stunnel.log
Empty file modified Gemfile
100755 → 100644
Empty file.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ maintained by [Dave Gandy](http://twitter.com/byscuits). Stay up to date [@fonta

Get started at http://fontawesome.io!


##License
- The Font Awesome font is licensed under the SIL OFL 1.1:
- http://scripts.sil.org/OFL
Expand Down Expand Up @@ -46,3 +45,17 @@ For more information on SemVer, please visit http://semver.org.
- GitHub: https://github.com/davegandy
- Work: Lead Product Designer @ http://kyru.us

## Hacking on Font Awesome

From the root of the repository, install the tools used to develop.

$ bundle install
$ npm install

Build the project and documentation:

$ bundle exec jekyll build

Or serve it on a local server on http://localhost:7998/Font-Awesome/:

$ bundle exec jekyll serve
27 changes: 27 additions & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PATH := ../node_modules/.bin:$(PATH)

FA_LESS_DIRECTORY = assets/font-awesome/less
FA_CSS_DIRECTORY = assets/font-awesome/css

FA_LESS_MODERN = ${FA_LESS_DIRECTORY}/font-awesome.less
FA_LESS_IE7 = ${FA_LESS_DIRECTORY}/font-awesome-ie7.less

FA_CSS_MODERN = ${FA_CSS_DIRECTORY}/font-awesome.css
FA_CSS_MODERN_MIN = ${FA_CSS_DIRECTORY}/font-awesome.min.css
FA_CSS_IE7 = ${FA_CSS_DIRECTORY}/font-awesome-ie7.css
FA_CSS_IE7_MIN = ${FA_CSS_DIRECTORY}/font-awesome-ie7.min.css


build:
@echo "Compiling Less files"
@mkdir -p ${FA_CSS_DIRECTORY}
recess --compile ${FA_LESS_MODERN} > ${FA_CSS_MODERN}
recess --compile --compress ${FA_LESS_MODERN} > ${FA_CSS_MODERN_MIN}
recess --compile ${FA_LESS_IE7} > ${FA_CSS_IE7}
recess --compile --compress ${FA_LESS_IE7} > ${FA_CSS_IE7_MIN}


default: build


.PHONE: build
17 changes: 15 additions & 2 deletions build/_plugins/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,27 @@ class Site
attr_reader :icons

def process
@icons = IconList.new(YAML.load_file(self.config['icon_meta'])['icons'])

self.reset_icons
self.reset
self.read
self.generate
self.render
self.cleanup
self.write

self.build
end

##
# Reads the YAML file that stores all data about icons
def reset_icons
@icons = IconList.new(YAML.load_file(self.config['icon_meta'])['icons'])
end

##
# After generation, runs a build of Font-Awesome
def build
system("make build", :chdir => self.config['destination'], :out => :err)
end

def site_payload
Expand Down
Binary file removed build/assets/font-awesome.zip
Binary file not shown.
Loading

0 comments on commit fd0a94b

Please sign in to comment.