Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.15.0 fails to parse bootstrap ("unexpected }") with keyframes = true #33

Closed
4 of 8 tasks
lopopolo opened this issue Dec 16, 2017 · 4 comments
Closed
4 of 8 tasks
Labels

Comments

@lopopolo
Copy link

Before you open an issue, please check if a similar issue already exists or has been closed before.

When reporting a bug, please be sure to include the following:

  • A descriptive title

  • An isolated way to reproduce the behavior (example: GitHub repository with code isolated to the issue that anyone can clone to observe the problem): https://github.com/lopopolo/hyperbola, using webpack. To exercise the bug, modify keyframes: true in webpack.config.js and run yarn install && make build

  • What version of purgecss you're using, and the platform(s) you're running it on: 0.15.0

  • The behavior you expect to see, and the actual behavior: actual behavior:

    /Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/lib/purgecss.js:1
    (function (exports, require, module, __filename, __dirname) { "use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}function normalizeArray(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function resolve(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:"/";if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");n&&(e=n+"/"+e,t="/"===n.charAt(0))}return e=normalizeArray(filter(e.split("/"),function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}function normalize(e){var t=isAbsolute(e),r="/"===substr(e,-1);return(e=normalizeArray(filter(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function isAbsolute(e){return"/"===e.charAt(0)}function join(){return normalize(filter(A
    CssSyntaxError: <css input>:6:71741: Unexpected }
        at Input.error (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/input.js:113:22)
        at Parser.unexpectedClose (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/parser.js:492:26)
         at Parser.end (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/parser.js:353:18)
        at Parser.parse (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/parser.js:68:26)
        at Function.parse (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/parse.js:24:16)
        at e.value (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/lib/purgecss.js:1:90949)
        at e.value (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/lib/purgecss.js:1:88660)
        at e.value (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/lib/purgecss.js:1:88224)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss-webpack-plugin/lib/purgecss-webpack-plugin.js:199:83
        at Array.forEach (<anonymous>)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss-webpack-plugin/lib/purgecss-webpack-plugin.js:182:27
        at Array.forEach (<anonymous>)
        at Compilation.<anonymous> (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss-webpack-plugin/lib/purgecss-webpack-plugin.js:174:30)
        at next (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/node_modules/tapable/lib/Tapable.js:204:14)
        at Compilation.<anonymous> (/Users/lopopolo/dev/repos/hyperbola/node_modules/extract-text-webpack-plugin/dist/index.js:275:11)
        at Compilation.applyPluginsAsyncSeries (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/node_modules/tapable/lib/Tapable.js:206:13)
        at sealPart2 (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/lib/Compilation.js:662:9)
        at next (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/node_modules/tapable/lib/Tapable.js:202:11)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/extract-text-webpack-plugin/dist/index.js:244:13
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:473:16
        at iteratorCallback (/Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:1050:13)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:958:16
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/extract-text-webpack-plugin/dist/index.js:227:15
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:473:16
        at iteratorCallback (/Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:1050:13)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:958:16
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/extract-text-webpack-plugin/dist/index.js:216:21
        at rebuilding.forEach.cb (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/lib/Compilation.js:530:29)
        at Array.forEach (<anonymous>)
        at callback (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/lib/Compilation.js:530:15)
    make: *** [build] Error 1
    

    Expected behavior: webpack successfully compiles, as it does in 0.14.0

When you open an issue for a feature request, please add as much detail as possible:

  • A descriptive title
  • A description of the problem you're trying to solve, including why you think this is a problem
  • An overview of the suggested solution
  • If the feature changes current behavior, reasons why your solution is better
@Ffloriel
Copy link
Member

Thank you for reporting this issue.
I will look into it.

@RicLeP
Copy link

RicLeP commented Dec 18, 2017

I have the same issue, it appears to be keyframe rules. Even a very simple stylesheet such as the following causes an issue.


@keyframes test {
	from {
		color: #ffffff;
	}

	to {
		color: #000000;
	}
}


@Ffloriel Ffloriel added the bug label Dec 18, 2017
@jsnanigans
Copy link
Member

@lopopolo this PR will fix this issue, thanks for reporting it.
#34

@jsnanigans
Copy link
Member

fixed in v0.19.0

Ffloriel added a commit that referenced this issue Oct 30, 2019
Update dependencies to enable Greenkeeper 🌴
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants