2017 © Pedro Peláez
 

library yii2-asset-converter

TEST

image

bankirru/yii2-asset-converter

TEST

  • Thursday, January 25, 2018
  • by max-dreamsoft
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 33 Forks
  • 0 Open issues
  • 23 Versions
  • 0 % Grown

The README.md

Only for YII2 with the new Asset Manager, convert Less and Sass files to CSS whithout external tools and executable. The sass and less files are converted with PHP libraries It replace the AssetConverter who use external tools. The Less and Sass file are converted with time source files dependency., (*1)

Requirements

YII 2.0, (*2)

Usage

1) Install with Composer, (*3)


"require": { "nizsheanez/yii2-asset-converter": "1.*", }, php composer.phar update

2) Modify assetManager in your configuration file {app}/protected/config/main.php, (*4)

    'assetManager' => [
        'bundles' => require(__DIR__ . '/assets.php'),
        'converter'=> [
            'class'=>'nizsheanez\assetConverter\Converter',
        ]
    ],

3) Create .gitignore in 4) Enjoy!, (*5)

  • Files with extension .sass are converted to a .css file
  • Files with extension .less are converted to a .css file
  • Files with extension .scss are converted to a .css file

Example of assets config file /protected/config/assets.php


return [ 'app' => [ 'basePath' => '@webroot', 'baseUrl' => '@web', 'css' => [ 'css/bootstrap.min.css', 'css/bootstrap-responsive.min.css', 'css/site.css', 'css/less_style.less', 'css/sass_style.sass', ], 'js' => [ ], 'depends' => [ 'yii', ], ], ];

Where is compiled files?

By default it present at @webroot/compiled But you can change it by destinationDir property from config, (*6)

Full configuration


'components' => [ 'assetManager' => [ 'converter'=> [ 'class'=> 'nizsheanez\assetConverter\Converter', 'force'=> false, // true : If you want convert your sass each time without time dependency 'destinationDir' => 'compiled', //at which folder of @webroot put compiled files 'parsers' => [ 'sass' => [ // file extension to parse 'class' => 'nizsheanez\assetConverter\Sass', 'output' => 'css', // parsed output file type 'options' => [ 'cachePath' => '@app/runtime/cache/sass-parser' // optional options ], ], 'scss' => [ // file extension to parse 'class' => 'nizsheanez\assetConverter\Sass', 'output' => 'css', // parsed output file type 'options' => [] // optional options ], 'less' => [ // file extension to parse 'class' => 'nizsheanez\assetConverter\Less', 'output' => 'css', // parsed output file type 'options' => [ 'auto' => true, // optional options ] ] ] ] ], ],

Also, for SCSS files you can use alternate configuration:, (*7)

'components' => [
    'assetManager' => [
            'converter'=> [
                // ...
                'parsers' => [
                    // ...
                    'scss' => [ // file extension to parse
                        'class' => 'nizsheanez\assetConverter\Scss',
                        'output' => 'css', // parsed output file type
                        'options' => [ // optional options
                            'enableCompass' => true, // default is true
                            'importPaths' => [], // import paths, you may use path alias here, 
                                // e.g., `['@path/to/dir', '@path/to/dir1', ...]`
                            'lineComments' => false, // if true — compiler will place line numbers in your compiled output
                            'outputStyle' => 'nested', // May be `compressed`, `crunched`, `expanded` or `nested`,
                                // see more at http://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style
                        ],
                    ],
                ],
            ],
        ],
    // ...

The Versions

29/12 2016

2.0.0

2.0.0.0

TEST

  Sources   Download

30/12 2015

v1.3.0

1.3.0.0

Less, Sass, Scss and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass scss compass phamlp

15/11 2015

v1.2.8

1.2.8.0

Less, Sass, Scss and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass scss compass phamlp

10/06 2015

v1.2.7

1.2.7.0

Less, Sass, Scss and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass scss compass phamlp

04/04 2015

v1.2.6

1.2.6.0

Less, Sass and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

03/02 2015

v1.2.5

1.2.5.0

Less, Sass and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

10/01 2015

v1.2.4

1.2.4.0

Less, Sass and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

11/12 2014

v1.2.3

1.2.3.0

Less, Sass and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

26/11 2014

v1.2.2

1.2.2.0

Less, Sass and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

03/08 2014

1.2.1

1.2.1.0

Less, Sass and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

06/11 2013

v1.2.0

1.2.0.0

Less, Sass and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

06/11 2013

v1.1.9

1.1.9.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

05/11 2013

v1.1.8

1.1.8.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

04/11 2013

v1.1.7

1.1.7.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

28/10 2013

v1.1.6

1.1.6.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

14/09 2013

v1.1.5

1.1.5.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

14/09 2013

v1.0.0

1.0.0.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

14/09 2013

v1.1.0

1.1.0.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

14/09 2013

v1.1.1

1.1.1.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

14/09 2013

v1.1.2

1.1.2.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp

14/09 2013

v1.1.4

1.1.4.0

Less, Sass and Phamlp converter for Yii2. No system requires. Fork of https://github.com/athos99/assetparser with Composer support, Less autoupdate by Composer, customizing of output directory

  Sources   Download

BSD-3-Clause

The Requires

 

by Alex Sharov

yii2 yii asset converter less sass phamlp