Skip to content

Commit 1aee990

Browse files
Initial Commit
0 parents  commit 1aee990

File tree

4 files changed

+647
-0
lines changed

4 files changed

+647
-0
lines changed

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
*.gem
2+
*.rbc
3+
.bundle
4+
.config
5+
.yardoc
6+
Gemfile.lock
7+
InstalledFiles
8+
_yardoc
9+
coverage
10+
doc/
11+
lib/bundler/man
12+
pkg
13+
rdoc
14+
spec/reports
15+
test/tmp
16+
test/version_tmp
17+
tmp
18+
19+
.DS_Store

critical-path-css.gemspec

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Gem::Specification.new do |s|
2+
s.name = 'critical-path-css'
3+
s.version = '0.0.0'
4+
s.date = '2015-08-27'
5+
s.summary = 'Critical Path CSS'
6+
s.description = 'Critical Path CSS'
7+
s.authors = ['Michael Misshore']
8+
s.email = 'mmisshore@gmail.com'
9+
s.files = ['lib/critical-path-css.rb']
10+
s.homepage = 'http://rubygems.org/gems/critical-path-css'
11+
s.license = 'MIT'
12+
13+
s.add_runtime_dependency 'phantomjs', ['~> 1.9.8.0']
14+
end

lib/critical-path-css.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class CriticalPathCss
2+
require 'phantomjs'
3+
4+
def self.generate_css
5+
Phantomjs.run("#{penthouse_path} http://google.com google.css > critical-css-google.css")
6+
end
7+
8+
private
9+
10+
def penthouse_path
11+
'penthouse/penthouse.js'
12+
end
13+
end

0 commit comments

Comments
 (0)