https://github.com/kern/sasset
Asset hosts with SASS/SCSS
https://github.com/kern/sasset
Last synced: about 2 months ago
JSON representation
Asset hosts with SASS/SCSS
- Host: GitHub
- URL: https://github.com/kern/sasset
- Owner: kern
- License: mit
- Created: 2010-11-06T19:14:25.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-11-01T18:00:32.000Z (over 13 years ago)
- Last Synced: 2025-03-02T18:52:05.676Z (3 months ago)
- Homepage: http://github.com/CapnKernul/sasset
- Size: 220 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Sasset
======Asset hosts with SASS/SCSS
Installation
------------Add this to your `Gemfile`:
gem 'sasset'
Then run `bundle install`.
Usage
-----First, in your `config/application.rb` file, set your asset host.
Sasset.asset_host = 'http://example.com'
This can also be a Proc. It works the same way as `ActionController::Base.asset_host`
so feel free to set them to the same thing. See [ActionView::Helpers::AssetTagHelper](http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html)
for more information.Now anywhere in your SASS/SCSS, you can now use the `asset-url()` function.
// Compiles to: background-image: url('http://example.com/bg.png');
background-image: asset-url('bg.png');Cool stuff.
Author
------Sasset is written by [Alexander Kern](http://kernpedia.com).
License
-------See the LICENSE file for details (it's the MIT License).