Download the PHP package panique/laravel-sass without Composer

On this page you can find all versions of the php package panique/laravel-sass. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sass

laravel-sass

Automatic Sass-to-CSS compiling for Laravel 4 (and any other framework by the way) while being in development. Every time you run your app (hitting index.php) laravel-sass will automatically compile all .scss files in your scss folder to .css files in your css folder. Support latest version of Sass (scss syntax) and mixins. Boom!

Installation & Usage

Add this to your composer.json, please note that this is a require-dev, not a normal require. This devides real dependencies from ones you only need for local development.

Add this line into your public/index.php in Laravel, right before $app->run();.

The first parameter is the relative path to your scss folder (create one) and the second parameter is the relative path to your css folder. Usually it totally makes sense to create those folders in the public folder. Make sure PHP can write into the css folder by giving the folder sudo chmod -R 777 public/css (when being in /var/www). Note: 777 is just for development, in a production server there's no need to give that folder any write-rights.

Install or update your Composer dependencies to add laravel-sass by doing composer install or composer update. Composer automatically installs everything in require-dev by default.

IMPORTANT: When you later deploy your application and don't want to install the require-dev stuff, then do composer install --no-dev (or composer update --no-dev).

Optional feature

There's an optional third parameter for SassCompiler::run() that expects one of the strings explained on http://leafo.net/scssphp/docs/#output_formatting. This defines the desired output. scss_formatter is the standard laravel-sass uses, choose scss_formatter_compressed if you need a minimized css file. scss_formatter_nested is for nested output, optimized for readability.

Testing

To test if everything works okay, simply add this to the head of app/views/hello.php: <link rel="stylesheet" type="text/css" href="css/style.css"> and put a file called style.scss in your scss folder. Now run the app and play around with the (s)css rules in your style.scss, after each refresh you should see the changes instantly!

How @import works

The @import of sass rules from other files works now perfectly. Make sure to import the files like it should be: If the file is called _colors.scss and is in the basic scss folder:

If the file is called _colors.scss and is in the subfolder modules of the basic scss folder:

Read the official docs for more.

When deploying ...

.. then make sure you comment out this line again: SassCompiler::run("scss/", "css/");. Future releases of this tool will have a development/production switch/recognizer.

To use the very latest features of Sass:

Currently php-sass fetches v0.0.14 (August 2014) of leafo/scssphp as a compiler. For latest features you might want a newer version, so have a look here https://github.com/leafo/scssphp/releases and edit the composer.json accordingly.

Used scripts

This tool uses the excellent scssphp Sass compiler. scssphp supports the latest SCSS syntax (3.2.12).

Other projects

License

Licensed under MIT. Totally free for private or commercial projects.

Support

If you think this script is useful, then think about supporting the project by renting your next server at Host1Plus or DigitalOcean.


All versions of laravel-sass with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
leafo/scssphp Version v0.0.14
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package panique/laravel-sass contains the following files

Loading the files please wait ....