Skip to content

danielfarrell/sass.ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sass.ex

Elixir NIF for libsass.

Use

mix compile
iex -S mix
Sass.compile "#navbar {width: 80%;height: 23px;ul { list-style-type: none; } li {float: left; a { font-weight: bold; } } }"
#=> {:ok, "#navbar {\n  width: 80%;\n  height: 23px; }\n  #navbar ul {\n    list-style-type: none; }\n  #navbar li {\n    float: left; }\n    #navbar li a {\n      font-weight: bold; }\n"}

Sass.compile_file "test/sample_scss.scss"
#=> {:ok, "/* sample_scss.scss */\n#navbar {\n  width: 80%;\n  height: 23px; }\n  #navbar ul {\n    list-style-type: none; }\n  #navbar li {\n    float: left; }\n    #navbar li a {\n      font-weight: bold; }\n"}

Roadmap

Obviously this is really early release software. The plans are:

  • More Tests
  • Better Documentation
  • Make Hex package
  • Compile a folder(sass_folder_context)
  • Improve the rotor

License

MIT/X11

Copyright (c) 2014 Daniel Farrell

Credit

Much of the code and explanation of how this could work was taken from two projects, Discount.ex and Sassy. Thanks guys!

About

Elixir Sass NIF for libsass

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published