madskristensen / WebCompiler

Visual Studio extension for compiling LESS and Sass files
Other
451 stars 172 forks source link

SCSS Autoprefixer #313

Open tbremer opened 7 years ago

tbremer commented 7 years ago

I see that this was merged a few days ago (#307), but has the extension been updated?

I can't seem to get autoPrefix to work using the following config:

[
    {
        "outputFile": "Content/app.css",
        "inputFile": "Content/app.scss",
        "options": {
            "autoPrefix": "last 2 versions"
        }
    },
    {
        "outputFile": "Scripts/autotrim.es5.js",
        "inputFile": "Scripts/autotrim.js"
    }
]

Any help would be greatly appreciated!

madskristensen commented 7 years ago

You can always get the latest CI build here for testing http://vsixgallery.com/extension/148ffa77-d70a-407f-892b-9ee542346862/

tbremer commented 7 years ago

That helps, thanks a lot. Is there a planned release for these new features?

I'd rather not have to tell my team to download a specific version of the Extension.

Thanks again!

madskristensen commented 7 years ago

It will be the exact same version that will be uploaded to the Marketplace so when newer versions are released they will automatically be updated by VS like normal

dehghani-mehdi commented 7 years ago

I downloaded latest version from http://vsixgallery.com/extension/148ffa77-d70a-407f-892b-9ee542346862/, but seems like this version doesn't respect to SourceMap generating config in compilerconfig.json.defaults file (the option is false, but WC still put source map in bottom of the generated css), so I downgrade WC to latest stable version, but really need to Autoprefixer too, is clear when you release stable version with Autoprefixer option? or can you fix the sourcemap issue on nightly build, please?

Ponant commented 7 years ago

Hi @madskristensen , I am getting a long commented string in the output css since I installed the latest version above. It reads something like this /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN.....+cZ+== */

Any idea how we can eliminate this?

dehghani-mehdi commented 7 years ago

@Ponant Same as my experience. the new version doesn't respect to the config.

Krusen commented 7 years ago

It's because postcss (which does the autoprefixing) adds a source map by default. I'll try to get this fixed soon.

Ponant commented 7 years ago

Hi @Krusen , It will be great to fix this, thanks a lot. I am also getting some warnings, such as placholder not being recognized as a valid pseudo-element. Besides this, I really thank you for this improvement, I am using it extensively and it is really helpful.

IanMuirhead commented 6 years ago

@madskristensen Any idea when this will be formally released?

lvmajor commented 6 years ago

Has it been released yet? I see it's available in NuGet as "BuildWebCompiler", but the VS Extension is still at version 1.11.326 and I wonder what the NuGet package is there for.... In my understanding the NuGet package is installed for the "compile on publish" option to work, but it doesn't seem to respect the Autoprefix option in compilerconfig.json.... am I doing something wrong?

ivostork commented 6 years ago

Any luck here? Maybe we can use the WebCompiler for SASS compiling and have external postcss script watching for changes in css file?

bknie1 commented 5 years ago

Work asked me to look into bringing AutoPrefixer (or something like it) into our stack. We already rely on WebCompiler, and I saw that LESS has AutoPrefixer support, but will SCSS be getting AutoPrefixer support? Noticed that this has been open for a long time. Thanks.

dehghani-mehdi commented 5 years ago

@bknie1, @os1r1s110, @ivostork, @IanMuirhead this feature already added to the latest version (no idea why this issue is still open).

Open up compilerconfig.json.defaults file and add "autoPrefix": "defaults" to sass section and you are good to go.

fauresco commented 5 years ago

How to pass other options to autoprefixer? Like grid: "autoplace"?

I need to support css grid in ie11 but autoprefixer docs says it is disabled by default.