mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Added sass executable.
git-svn-id: svn://hamptoncatlin.com/haml/trunk@266 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
3978a0d2df
commit
bf76d64a59
2 changed files with 20 additions and 2 deletions
4
Rakefile
4
Rakefile
|
@ -54,7 +54,7 @@ unless ARGV[0] == 'benchmark'
|
|||
|
||||
spec = Gem::Specification.new do |spec|
|
||||
spec.name = 'haml'
|
||||
spec.summary = 'An elegant, structured XHTML/XML templating engine.'
|
||||
spec.summary = "An elegant, structured XHTML/XML templating engine.\nComes with Sass, a similar CSS templating engine."
|
||||
spec.version = File.read('VERSION').strip
|
||||
spec.author = 'Hampton Catlin'
|
||||
spec.email = 'haml@googlegroups.com'
|
||||
|
@ -72,7 +72,7 @@ unless ARGV[0] == 'benchmark'
|
|||
list.exclude(/[a-z]/)
|
||||
list.exclude('TODO')
|
||||
end.to_a
|
||||
spec.executables = ['haml']
|
||||
spec.executables = ['haml', 'sass']
|
||||
spec.files = FileList['lib/**/*', 'bin/*', 'test/**/*', 'Rakefile'].to_a + readmes
|
||||
spec.homepage = 'http://haml.hamptoncatlin.com/'
|
||||
spec.has_rdoc = true
|
||||
|
|
18
bin/sass
Normal file
18
bin/sass
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env ruby
|
||||
# The command line Sass parser.
|
||||
|
||||
if ARGV[0] == "--help" or ARGV[0] == "-h" or ARGV[0] == "-?"
|
||||
puts <<END
|
||||
Usage: sass (template file) (output file)
|
||||
|
||||
Description:
|
||||
Uses the Sass engine to parse the specified template
|
||||
and outputs the result to the specified file.
|
||||
END
|
||||
else
|
||||
require File.dirname(__FILE__) + '/../lib/sass'
|
||||
|
||||
template = File.read(ARGV[0])
|
||||
result = Sass::Engine.new(template).result
|
||||
File.open(ARGV[1], "w") { |f| f.write(result) }
|
||||
end
|
Loading…
Add table
Reference in a new issue