2017 © Pedro Peláez
 

library stylus

PHP wrapper to execute stylus node package or fallback to a PHP alternative

image

nodejs-php-fallback/stylus

PHP wrapper to execute stylus node package or fallback to a PHP alternative

  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 16 % Grown

The README.md

stylus

Latest Stable Version Build Status StyleCI Test Coverage Code Climate, (*1)

PHP wrapper to execute stylus node package or fallback to a PHP alternative., (*2)

Usage

First you need composer if you have not already. Then get the package with composer require nodejs-php-fallback/stylus then require the composer autload in your PHP file if it's not already:, (*3)

<?php

use NodejsPhpFallback\Stylus;

// Require the composer autoload in your PHP file if it's not already.
// You do not need to if you use a framework with composer like Symfony, Laravel, etc.
require 'vendor/autoload.php';

$stylus = new Stylus('path/to/my-stylus-file.styl');

// Output to a file:
$stylus->write('path/to/my-css-file.css');

// Get CSS contents:
$cssContents = $stylus->getCss();

// Output to the browser:
header('Content-type: text/css');
echo $stylus->getCss();

// You can also get Stylus code from a string:
$stylus = new Stylus('
a
  color blue
  &:hover
    color navy
');
// Then write CSS with:
$stylus->write('path/to/my-css-file.css');
// or get it with:
$cssContents = $stylus->getCss();

// Pass true to the Stylus constructor to minify the rendered CSS:
$stylus = new Stylus('path/to/my-stylus-file.styl', true);

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure., (*4)

The Versions

17/05 2018

dev-master

9999999-dev

PHP wrapper to execute stylus node package or fallback to a PHP alternative

  Sources   Download

The Requires

 

The Development Requires

by Kyle

16/10 2017

1.0.3

1.0.3.0

PHP wrapper to execute stylus node package or fallback to a PHP alternative

  Sources   Download

The Requires

 

The Development Requires

by Kyle

16/10 2017

1.0.2

1.0.2.0

PHP wrapper to execute stylus node package or fallback to a PHP alternative

  Sources   Download

The Requires

 

The Development Requires

by Kyle

26/07 2016

dev-update

dev-update

PHP wrapper to execute stylus node package or fallback to a PHP alternative

  Sources   Download

The Requires

 

The Development Requires

by Kyle

25/07 2016

1.0.1

1.0.1.0

PHP wrapper to execute stylus node package or fallback to a PHP alternative

  Sources   Download

The Requires

 

The Development Requires

by Kyle

24/07 2016

dev-coverage

dev-coverage

PHP wrapper to execute stylus node package or fallback to a PHP alternative

  Sources   Download

The Requires

 

The Development Requires

by Kyle

23/07 2016

1.0.0

1.0.0.0

PHP wrapper to execute stylus node package or fallback to a PHP alternative

  Sources   Download

The Requires

 

The Development Requires

by Kyle