2017 © Pedro PelĂĄez
 

symfony-bundle sass-bridge-bundle

This bundle allows sass rewrites in symfony projects

image

javihgil/sass-bridge-bundle

This bundle allows sass rewrites in symfony projects

  • Wednesday, July 16, 2014
  • by javihgil
  • Repository
  • 1 Watchers
  • 0 Stars
  • 69 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

SassBridgeBundle

Configure Bundle

composer.json, (*1)

require: {
    "javihgil/sass-bridge-bundle": "~1.0"
}

Assetic SassRewrite filter configuration

app/config/config.yml, (*2)

# Assetic Configuration
assetic:
    ...
    filters:
        sassrewrite:
            resource: %kernel.root_dir%/../src/Jhg/SassBridgeBundle/Resources/config/assetic/sassrewrite.xml
            apply_to: "\.(scss)$"
        ...

Hay que apuntar al XML del filtro en resource segĂșn el directorio de instalaciĂłn., (*3)

Usage, (*4)

/* src/....Bundle/Resources/assets/styles/sample.scss */

@import '@OtherBundleBundle/Resources/assets/styles/other-sample.scss';

div#id {
    background-image: url('@OtherBundleBundle/Resources/public/images/sample.png');
}

Configure Sass

Ubuntu installation

$ sudo apt-get install ruby
$ sudo gem install sass
$ sudo gem install compass

Symfony config

config/parameters.yml, (*5)

assetic_ruby_bin: /usr/bin/ruby
assetic_compass_bin: /usr/local/bin/compass
assetic_sass_bin: /usr/local/bin/sass

config/config.yml assetic: .... ruby: "%assetic_ruby_bin%" filters: sass: bin: "%assetic_compass_bin%" compass: bin: "%assetic_compass_bin%", (*6)

Bootstrap Sass

composer.json, (*7)

"require": {
    "twbs/bootstrap-sass": "dev-master"
},

app/config/config.yml, (*8)

jhg_sass_bridge:
    resources_paths:
        bootstrap: "../vendor/twbs/bootstrap-sass/vendor/assets/stylesheets/bootstrap"

Usage

@import '@boostrap/variables';

Configure development cache

Assetic only watch if a file was modified, but no if any of imports were modified., (*9)

In development process we want to test any change quick, so we need to disable assetic caching., (*10)

app/config/config_dev.yml, (*11)

parameters:
    # overrides assetic cache on development for disable scss caching
    assetic.cache.class: Jhg\SassBridgeBundle\Assetic\Cache\FilesystemDevDisableCache

The Versions

16/07 2014

dev-master

9999999-dev

This bundle allows sass rewrites in symfony projects

  Sources   Download

MIT

The Requires

 

bundle symfony sass

16/07 2014

v1.0.5

1.0.5.0

This bundle allows sass rewrites in symfony projects

  Sources   Download

MIT

The Requires

 

bundle symfony sass

16/06 2014

v1.0.4

1.0.4.0

This bundle allows sass rewrites in symfony projects

  Sources   Download

MIT

The Requires

 

bundle symfony sass

08/06 2014

v1.0.3

1.0.3.0

This bundle allows sass rewrites in symfony projects

  Sources   Download

MIT

The Requires

 

bundle symfony sass

08/06 2014

v1.0.2

1.0.2.0

This bundle allows sass rewrites in symfony projects

  Sources   Download

MIT

The Requires

 

bundle symfony sass

07/06 2014

v1.0.1

1.0.1.0

This bundle allows sass rewrites in symfony projects

  Sources   Download

MIT

The Requires

 

bundle symfony sass

07/06 2014

v1.0.0

1.0.0.0

This bundle allows sass rewrites in symfony projects

  Sources   Download

MIT

The Requires

 

bundle symfony sass