danielhusar / grunt-pleeease

Grunt plugin for postprocess CSS with ease.
MIT License
23 stars 2 forks source link

files or in/out? #4

Closed davidmatas closed 9 years ago

davidmatas commented 9 years ago

Not working for me. I've tested with this multiple files object:

files: {
   'public/app/themes/css/': 'public/app/themes/css/pleeease/*.css'
}

Should I include in/out pleeease options instead?

danielhusar commented 9 years ago

Hi,

it should work like this. Is your path public/app/themes/css/pleeease correct ?

davidmatas commented 9 years ago

Yes, it is correct, it a tested folder I have include to put the output. I execute with grunt pleeease and nothing happens:

› grunt pleeease
Running "pleeease:custom" (pleeease) task

Done, without errors.
danielhusar commented 9 years ago

Can you try without the wildcard, just one particular file? The path is relative to your gruntfile.

davidmatas commented 9 years ago

Yes, it works, but only if I try to read/write from/to the same site:

files: {
   'public/app/themes/css/default.css': 'public/app/themes/css/default.css'
}

If I try a different output does not work.

danielhusar commented 9 years ago

Weird, maybe some permissions issue? Does some other grunt task works fine?

bogomolov-dev commented 9 years ago

Hi danielhusar, I have the same issue. Configuration:

pleeease: {
        custom: {
          options: {
            autoprefixer: {
              "browsers": [
                "> 1%",
                "last 10 versions",
                "Firefox ESR",
                "Opera 12.1"
              ],
              "cascade":  true
            },
            filters:      {"oldIE": true},
            rem:          ["16px", {replace: false}],
            minifier:     false
          },
          files:   {
            '../assets/css/dev/style.css': '../assets/css/dev/style.fixed.css'
          }
        }
      }

Run with:

grunt css-ready -vvv

Output:

Verifying property pleeease.custom exists in config...OK
Files: [no src] -> ../assets/css/dev/style.css
Options: autoprefixer={"browsers":["> 1%","last 10 versions","Firefox ESR","Opera 12.1"],"cascade":true}, filters={"oldIE":true}, rem=["16px",{"replace":false}], minifier=false

Done, without errors.

The file ../assets/css/dev/style.css does exists and I get no errors with the stand-alone version of pleeease. Other Grunt tasks work fine.

danielhusar commented 9 years ago

Hi,

its other way around. ../assets/css/dev/style.css is used as a source. Can you switch them to see if it works ?

bogomolov-dev commented 9 years ago

Oh yes, the key is the target and the value the source. It woks now. Thank you!

davidmatas commented 9 years ago

Sorry for delay :sweat_smile: It worked for me too with source as target and destiny in key:

files: {
   'public/app/themes/css/pleeease/': 'public/app/themes/css/*.css': 
}