Download the PHP package shyim/sasso without Composer

On this page you can find all versions of the php package shyim/sasso. 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 sasso

php-sasso

A PHP extension that compiles SCSS / Sass → CSS natively, in-process, with no Node, no Dart VM, and no subprocess. It is a thin ext-php-rs binding around sasso — a pure-Rust, zero-dependency dart-sass alternative that matches current dart-sass byte-for-byte on the subset it implements.

The loaded extension is named sasso (extension=sasso, php -m shows sasso, extension_loaded('sasso')); php-sasso is just the repository name.

Requirements

Install with PIE

The package is PIE-compatible. With a Rust toolchain available, PIE builds the extension from source (via phpize/configure/make, which shell out to cargo) and installs it:

Then enable it in your php.ini:

Build & install manually

This builds --release and copies the module into $(php-config --extension-dir) as sasso.so. Then enable it in your php.ini with extension=sasso.so.

Equivalently, the PIE/pecl build flow works directly:

To try it without installing:

Usage

The API is object-oriented: a single fluent Sasso\Compiler class.

Fluent compiler

Custom importer

@import / @use / @forward can be resolved from anywhere — a database, an archive, a virtual filesystem — by implementing the Sasso\Importer interface and passing an instance to setImporter():

The importer is consulted first; any addImportPath() load paths act as a fallback when resolve() returns null. If resolve() returns null and nothing else resolves the URL, the import fails with a CompileException.

If resolve() throws, that exception propagates out of compile() unchanged — same class, code and message — so you can surface a real error (a missing DB row, an I/O failure) instead of a generic "stylesheet not found":

Indented .sass syntax

API

Sasso\Compiler

Method Description
__construct() Defaults: expanded, SCSS, Unicode diagnostics.
setStyle(int $style): static STYLE_EXPANDED or STYLE_COMPRESSED.
setSyntax(int $syntax): static SYNTAX_SCSS, SYNTAX_SASS or SYNTAX_CSS.
setUnicode(bool $on): static Unicode vs ASCII diagnostic glyphs.
setUrl(?string $url): static Display path for diagnostics (enables snippets).
addImportPath(string $path): static Append an @import/@use load path.
setImportPaths(array $paths): static Replace all load paths.
setImporter(?Sasso\Importer $importer): static Userland resolver (load paths are the fallback); null clears.
compile(string $source): string Compile; throws Sasso\CompileException.

Sasso\Importer (interface)

Method Description
resolve(string $url): ?string Return the partial's SCSS/Sass source for $url, or null if not found.

All setters return $this for chaining. Invalid STYLE_* / SYNTAX_* values are reported (as a thrown exception) at compile() time.

Constants (on Sasso\Compiler)

STYLE_EXPANDED = 0, STYLE_COMPRESSED = 1, SYNTAX_SCSS = 0, SYNTAX_SASS = 1, SYNTAX_CSS = 2.

License

MIT OR Apache-2.0, matching sasso.


All versions of sasso with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
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 shyim/sasso contains the following files

Loading the files please wait ...