Does anyone know how to install SASS on Laravel 4?

I am trying to run the installation of SASS on Laravel 4.

I start the composer and create my .json composer as follows:

{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "require": { "laravel/framework": "4.0.*", "cartalyst/sentry": "2.0.*", }, "autoload": { "classmap": [ "app/commands", "app/controllers", "app/models", "app/database/migrations", "app/database/seeds", "app/tests/TestCase.php" ] }, "scripts": { "post-install-cmd": [ "php artisan optimize" ], "post-update-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-create-project-cmd": [ "php artisan key:generate" ] }, "config": { "preferred-install": "dist" }, "minimum-stability": "dev" } 

I wondered if there was a really easy way to do this in the composer, to add it as a project dependency.

The reason I want to do this is because it is easier to manage and helps in the construction in the long run.

If there is another way to do this and install grunt to minimize css / js, that would be even better.

Thanks.

+6
source share
1 answer

Try laravel-sass !

Like all other projects that I found, were either dead, or badly broken, or simply did not offer automatic scss compilation (without having to run it manually each time). In the end, I wrote a simple tool that:

  • automatically compiles all .scss to your scss folder into files with the same name .css to css folder
  • written in pure PHP !
  • uses a great scssphp compiler and puts automatism around it
  • supports the latest SCSS syntax, currently SCSS 3.2.12
  • installed via Composer with one line of code
  • Let you define the scss and css folder, so you will always have the exact same css files of your scss

My blog installation tutorial: How to use SASS in Laravel .

+9
source

Source: https://habr.com/ru/post/956569/


All Articles