Download the PHP package clawrock/magento2-sass-preprocessor without Composer

On this page you can find all versions of the php package clawrock/magento2-sass-preprocessor. 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 magento2-sass-preprocessor

Packagist Packagist Build Status Coverage Status

Magento 2 - Sass Preprocessor module

Module for Sass processing during static content deployment with additional Gulp workflow to improve Magento 2 development speed. It compiles SCSS using scssphp and process standard @import instruction as well as @magento_import.

Installation

  1. Install module via composer composer require clawrock/magento2-sass-preprocessor
  2. Register module php bin/magento setup:upgrade
  3. Compile Sass theme using php bin/magento setup:static-content:deploy -f

Example theme

Works with

Preprocessor

Gulp

  1. Install Node.js
  2. Install Gulp configuration php bin/magento dev:gulp:install
  3. Install Gulp and required dependencies npm install
  4. Define theme configuration php bin/magento dev:gulp:theme
  5. Symlink theme to pub/static folder gulp exec:[theme_key]
  6. Compile SCSS gulp scss:[theme_key]
  7. Watch for changes gulp watch:[theme_key]

It also supports LESS, instead of SCSS use less like gulp less:[theme_key]

Use additional flags to enable more watchers:

Configure theme

You can manually configure theme like in Gruntfile which is shipped with Magento or use php bin/magento dev:gulp:theme command which will configure it for you.

Reference: Grunt configuration file

Commands

Shortcut Full command
gulp build:scss:[theme] gulp exec:[theme] && gulp scss:[theme]
gulp dev:scss:[theme] gulp exec:[theme] && gulp scss:[theme] && gulp watch:[theme]

List of gulp commands:

BrowserSync

Pass --proxy http://magento.test argument to gulp watch:[theme_key] or gulp dev:scss[theme_key] where http://magento.test is Magento base url and BrowserSync will be enabled.

You can configure BrowserSync in dev/tools/gulp/config/browser-sync.json. Reference

Example usage

gulp dev:scss:my_theme --proxy http://m2.test --phtml

Troubleshooting

If you had previously installed Grunt, please make sure you have removed package-lock.json and node_modules folder. Then run npm install.

For development with enabled SSL please provide path to SSL key and certificate in BrowserSync configuration file.


All versions of magento2-sass-preprocessor with dependencies

PHP Build Version
Package Version
Requires magento/framework Version ~101.0|~102.0|~103.0
leafo/scssphp Version ^0.7.7
magento/module-developer Version ^100.2
magento/module-store Version ^100.2|^101.0
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 clawrock/magento2-sass-preprocessor contains the following files

Loading the files please wait ....