https://github.com/imarc/craft-sass
A Craft plugin that compiles SASS on the server as needed.
https://github.com/imarc/craft-sass
Last synced: 5 months ago
JSON representation
A Craft plugin that compiles SASS on the server as needed.
- Host: GitHub
- URL: https://github.com/imarc/craft-sass
- Owner: imarc
- License: other
- Created: 2015-03-11T14:36:24.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-12T21:45:53.000Z (over 9 years ago)
- Last Synced: 2025-08-29T19:32:51.113Z (10 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 14
- Watchers: 25
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Sass Plugin for Craft
=====================
This is a Sass plugin for Craft using [scssphp](http://leafo.net/scssphp/).
It compiles SASS to CSS on the fly, and caches the results to disk until the file changes.
Installation
------------
Installation requires [composer](https://getcomposer.org/). This plugn also is makes use of [composer/installers](https://github.com/composer/installers) to make the plugin composer compatible.
1. In the **root** of your project, run `composer require imarc/craft-sass`.This will create a `vendor/` directory as well as automatically put the plugin it self in `craft/plugins/sass/`.
2. Upload both the `vendor/` and `craft/plugins/sass/` directories.
3. Enable the plugin in the Craft Plugins panel.
Usage
-----
Upload SCSS files within your document root. For example, `public/css/styles.scss`.
Linking to that file from a twig template should look something like this:
```
```
`craft.sass.link()` generates a link that is routed to the plugin, which in turn compiles the SASS file into CSS.
Tests
-----
To run the tests, be sure you have phpunit installed and then:
```
composer install
phpunit
```