Skip to content

Commit

Permalink
Migrated refrences from Leafo to ScssPhp
Browse files Browse the repository at this point in the history
  • Loading branch information
shadoath committed Jan 30, 2021
1 parent 027e8ce commit 9b7bc1b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions class/class-wp-scss.php
@@ -1,7 +1,7 @@
<?php

include_once( WPSCSS_PLUGIN_DIR . '/scssphp/scss.inc.php' );
use Leafo\ScssPhp\Compiler;
use ScssPhp\ScssPhp\Compiler;

class Wp_Scss {
/**
Expand Down Expand Up @@ -68,7 +68,7 @@ function compiler($in, $out, $instance) {
if (is_writable($cache)) {
try {
$map = basename($out) . '.map';
$scssc->setSourceMap(constant('Leafo\ScssPhp\Compiler::' . $instance->sourcemaps));
$scssc->setSourceMap(constant('ScssPhp\ScssPhp\Compiler::' . $instance->sourcemaps));
$scssc->setSourceMapOptions(array(
'sourceMapWriteTo' => $instance->css_dir . $map, // absolute path to a file to write the map to
'sourceMapURL' => $map, // url of the map
Expand Down
12 changes: 6 additions & 6 deletions options.php
Expand Up @@ -118,12 +118,12 @@ public function page_init()
'name' => 'compiling_options',
'type' => apply_filters( 'wp_scss_compiling_modes',
array(
'Leafo\ScssPhp\Formatter\Expanded' => 'Expanded',
'Leafo\ScssPhp\Formatter\Nested' => 'Nested',
'Leafo\ScssPhp\Formatter\Compressed' => 'Compressed',
'Leafo\ScssPhp\Formatter\Compact' => 'Compact',
'Leafo\ScssPhp\Formatter\Crunched' => 'Crunched',
'Leafo\ScssPhp\Formatter\Debug' => 'Debug'
'ScssPhp\ScssPhp\Formatter\Expanded' => 'Expanded',
'ScssPhp\ScssPhp\Formatter\Nested' => 'Nested',
'ScssPhp\ScssPhp\Formatter\Compressed' => 'Compressed',
'ScssPhp\ScssPhp\Formatter\Compact' => 'Compact',
'ScssPhp\ScssPhp\Formatter\Crunched' => 'Crunched',
'ScssPhp\ScssPhp\Formatter\Debug' => 'Debug'
)
)
)
Expand Down
6 changes: 3 additions & 3 deletions readme.md
@@ -1,7 +1,7 @@
# WP-SCSS
#### A lightweight SCSS compiler for Wordpress.

Compiles .scss files on your wordpress install using [lefo's scssphp](https://github.com/leafo/scssphp). Includes settings page for configuring directories, error reporting, compiling options, and auto enqueuing.
Compiles .scss files on your wordpress install using [scssphp](https://github.com/scssphp/scssphp). Includes settings page for configuring directories, error reporting, compiling options, and auto enqueuing.

The plugin only compiles when changes have been made to the scss files. Compiles are made to the matching css file, so disabling this plugin will not take down your stylesheets. In the instance where a matching css file does not exist yet, the plugin will create the appropriate css file in the css directory.

Expand Down Expand Up @@ -29,7 +29,7 @@ Compiling comes in five modes:
* Compact - Removes all line breaks, unnecessary whitespace, and single-line comments.
* Crunched - Same as Compressed, but also removes multi-line comments.

See examples of each in [leafo's documentation](http://leafo.github.io/scssphp/docs/#output-formatting)
See examples of each in [scssphp's documentation](http://scssphp.github.io/scssphp)

#### Source Map Mode
Source maps come in three modes:
Expand All @@ -51,7 +51,7 @@ Also keep in mind, that if you disable this plugin it can no longer enqueue file

## Directions

*This plugin requires at least php 5.4 to work.*
*This plugin requires at least php 5.6 to work.*

#### Importing Subfiles
You can import other scss files into parent files and compile them into a single css file. To do this, use @import as normal in your scss file. All imported file names *must* start with an underscore. Otherwise they will be compiled into their own css file.
Expand Down
2 changes: 1 addition & 1 deletion wp-scss.php
Expand Up @@ -149,7 +149,7 @@ function wpscss_settings_error() {
$wpscss_settings = array(
'scss_dir' => WPSCSS_THEME_DIR . $scss_dir_setting,
'css_dir' => WPSCSS_THEME_DIR . $css_dir_setting,
'compiling' => isset($wpscss_options['compiling_options']) ? $wpscss_options['compiling_options'] : 'Leafo\ScssPhp\Formatter\Expanded',
'compiling' => isset($wpscss_options['compiling_options']) ? $wpscss_options['compiling_options'] : 'ScssPhp\ScssPhp\Formatter\Expanded',
'errors' => isset($wpscss_options['errors']) ? $wpscss_options['errors'] : 'show',
'sourcemaps' => isset($wpscss_options['sourcemap_options']) ? $wpscss_options['sourcemap_options'] : 'SOURCE_MAP_NONE',
'enqueue' => isset($wpscss_options['enqueue']) ? $wpscss_options['enqueue'] : 0
Expand Down

0 comments on commit 9b7bc1b

Please sign in to comment.