romanschejbal / gassetic

Assetic replacement based on the gulp build tool
MIT License
176 stars 17 forks source link

Gassetic is not replacing in Mac OSX #37

Closed ferranorriols closed 9 years ago

ferranorriols commented 9 years ago

I have been using gassetic in several Symfony2 projects using Linux/Ubuntu without problems. However I tried the same gassetic configuration using MAC OSX and something went wrong. The script never replaces the comments in the twig template but I didn't get an error message. I would be very pleased to know what is going wrong and if there is someone using Mac OSX with gassetic.

Thanks

romanschejbal commented 9 years ago

Yea, gassetic was build on MAC OSX actually. It could be an issue with wrong paths to templates or the tags themselves - could be spelled wrong maybe?

--  Roman Schejbal Sent with Airmail

On 22 December 2014 at 01:30:05, Ferran Orriols (notifications@github.com) wrote:

I have been using gassetic in several projects using Linux/Ubuntu without problems. However I tried the same gassetic configuration using MAC OSX and something went wrong. The script never replaces the comments in the twig template but I didn't get an error message. I would be very pleased to know what is going wrong and if there is someone using Mac OSX with gassetic.

Thanks

— Reply to this email directly or view it on GitHub.

ferranorriols commented 9 years ago

Thanks for your help. I tried different paths and different tags and it was impossible to replace the comments from the template. Do you have any other ideas?

ferranorriols commented 9 years ago

I found out the problem. There was an undefined variable in my style.less file. However I didn't get any error in the output and the other files weren't processed either. I give you a simple example to see the issue:

gassetic.yml:

requires:
    concat:       gulp-concat
    uglify:       gulp-uglify
    less:         gulp-less
    minify-css:   gulp-minify-css

mimetypes:
    css:
        dev:
            outputFolder: web/tmp/css
            webPath: /tmp/css
            tasks:
                - { name: less }
        files:
            style.css:
                - bower_components/bootstrap/less/bootstrap.less
                - src/Acme/MyBundle/Resources/public/css/style.less

replacementPaths:
    - app/Resources/views/*.html.twig

default:
    - css

src/Acme/MyBundle/Resources/public/css/style.less:

.title {
  margin-bottom: @undefined-value;
}

app/Resources/views/base.html.twig:

<html>
    <head>
        <!-- dev:style.css --><!-- endbuild -->
    </head>
</html>
➜ git:(master) ✗ ./node_modules/.bin/gassetic build -env=dev
[03:45:05] Processing: css with less()
[03:45:05]  - style.css
[03:45:05] Tested 3 tests, 3 passes, 0 failures: PASS
romanschejbal commented 9 years ago

Cool! Try to put gulp-plumber as the first task, then you get the errors printed into console. ;)

ferranorriols commented 9 years ago

Thanks for the advice :-)