├── .github ├── FUNDING.yml └── workflows │ └── ci.yml ├── .gitignore ├── .rspec ├── .rubocop.yml ├── .standard.yml ├── CHANGELOG.md ├── Dockerfile ├── Gemfile ├── LICENSE ├── README.md ├── Rakefile ├── autoprefixer-rails.gemspec ├── build.sh ├── build ├── autoprefixer.js ├── package.json ├── rollup.config.js ├── url.js ├── yarn-error.log └── yarn.lock ├── lib ├── autoprefixer-rails.rb ├── autoprefixer-rails │ ├── processor.rb │ ├── railtie.rb │ ├── result.rb │ ├── sprockets.rb │ └── version.rb └── rake │ └── autoprefixer_tasks.rb ├── spec ├── app │ ├── .browserslistrc │ ├── .gitignore │ ├── Rakefile │ ├── app │ │ ├── assets │ │ │ ├── config │ │ │ │ └── manifest.js │ │ │ └── stylesheets │ │ │ │ ├── evaluate.css.erb │ │ │ │ ├── loaded.sass │ │ │ │ ├── sass.sass │ │ │ │ ├── test.css │ │ │ │ └── wrong.css │ │ └── controllers │ │ │ ├── application_controller.rb │ │ │ └── css_controller.rb │ ├── config.ru │ └── config │ │ ├── application.rb │ │ ├── autoprefixer.yml │ │ ├── boot.rb │ │ ├── environment.rb │ │ ├── environments │ │ └── test.rb │ │ ├── initializers │ │ └── secret_token.rb │ │ └── routes.rb ├── autoprefixer_spec.rb ├── processor_spec.rb ├── rails_spec.rb ├── railtie_spec.rb └── spec_helper.rb └── vendor └── autoprefixer.js /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | tidelift: rubygems/autoprefixer-rails 2 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | linters: 6 | name: Linters 7 | # Run linting only once, on a single platform 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout code 11 | uses: actions/checkout@v3 12 | 13 | - name: Setup Ruby and install gems 14 | uses: ruby/setup-ruby@v1 15 | with: 16 | ruby-version: 2.7 17 | bundler-cache: true 18 | 19 | - name: Setup Node 20 | uses: actions/setup-node@v3 21 | 22 | - name: Run linters 23 | run: | 24 | bundle exec rake standard:fix 25 | 26 | tests: 27 | name: Tests 28 | strategy: 29 | fail-fast: false 30 | matrix: 31 | os: 32 | - ubuntu-latest 33 | - macos-latest 34 | # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' 35 | ruby: 36 | - 2.5 37 | - 2.6 38 | - 2.7 39 | - '3.0' 40 | - 3.1 41 | - 3.2 42 | - 3.3 43 | 44 | runs-on: ${{ matrix.os }} 45 | 46 | steps: 47 | - name: Checkout code 48 | uses: actions/checkout@v3 49 | 50 | - name: Setup Ruby and install gems 51 | uses: ruby/setup-ruby@v1 52 | with: 53 | ruby-version: ${{ matrix.ruby }} 54 | bundler-cache: true 55 | 56 | - name: Setup Node 57 | uses: actions/setup-node@v3 58 | 59 | - name: Run tests 60 | env: 61 | EXECJS_RUNTIME: MiniRacer 62 | run: bundle exec rake spec 63 | 64 | - name: Run tests on EXECJS_RUNTIME=Node 65 | if: ${{ matrix.ruby == '2.7' }} 66 | env: 67 | EXECJS_RUNTIME: Node 68 | run: bundle exec rake spec 69 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | *~ 3 | 4 | pkg/ 5 | 6 | .bundle 7 | Gemfile.lock 8 | 9 | build/node_modules/ 10 | .rspec_status 11 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --format documentation --colour 2 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | require: 2 | - rubocop-packaging 3 | 4 | AllCops: 5 | NewCops: enable 6 | TargetRubyVersion: 2.4 7 | 8 | Lint/SuppressedException: 9 | Enabled: false 10 | 11 | Metrics: 12 | Enabled: false 13 | 14 | Naming/FileName: 15 | Enabled: false 16 | 17 | Style/GuardClause: 18 | Enabled: false 19 | 20 | Style/StringLiterals: 21 | Enabled: true 22 | EnforcedStyle: double_quotes 23 | 24 | Style/StringLiteralsInInterpolation: 25 | Enabled: true 26 | EnforcedStyle: double_quotes 27 | -------------------------------------------------------------------------------- /.standard.yml: -------------------------------------------------------------------------------- 1 | ruby_version: 2.3 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | ## 10.4.21.0 3 | * Fixed old `-moz-` prefix for `:placeholder-shown` (by @Marukome0743). 4 | * Fixed `fit-content` prefix for Firefox. 5 | 6 | ## 10.4.19.0 7 | * Removed `end value has mixed support, consider using flex-end` warning 8 | since `end`/`start` now have good support. 9 | * Fixed removing `-webkit-box-orient` on `-webkit-line-clamp` (@Goodwine). 10 | * Fixed `user-select: contain` prefixes. 11 | 12 | ## 10.4.16.0 13 | * Improved performance (by Romain Menke). 14 | 15 | ## 10.4.15.0 16 | * Improved startup time and reduced JS bundle size (by Kārlis Gaņģis). 17 | * Fixed `::backdrop` prefixes (by 一丝). 18 | 19 | ## 10.4.13.0 20 | * Fixed missed prefixes on vendor prefixes in name of CSS Custom Property. 21 | * Fixed support of unit-less zero angle in backgrounds (by 一丝). 22 | * Fixed `text-decoration` prefixes by moving to MDN data (by Romain Menke). 23 | * Fixed `unicode-bidi` prefixes by moving to MDN data. 24 | * Fixed `css-unicode-bidi` issue from latest Can I Use. 25 | * Do not print `color-adjust` warning if `print-color-adjust` also is in rule. 26 | 27 | ## 10.4.7.0 28 | * Fixed `print-color-adjust` support in Firefox. 29 | * Fixed `print-color-adjust` support. 30 | * Fixed `NaN` in grid (by @SukkaW). 31 | 32 | ## 10.4.2.0 33 | * Fixed missed `-webkit-` prefix for `width: stretch`. 34 | * Fixed `::file-selector-button` data (by Luke Warlow). 35 | * Ensure sprockets-rails is loaded before autoprefixer-rails (by Thomas Morgan) 36 | 37 | ## 10.4.0.0 38 | * Added `:autofill` support (by Luke Warlow). 39 | 40 | ## 10.3.3.0 41 | * Fixed `::file-selector-button` support (by Usman Yunusov). 42 | * Fixed wrong `-moz-` prefix from `::file-selector-button` (by Usman Yunusov). 43 | 44 | ## 10.3.1.0 45 | * Added `::file-selector-button` support (by Luke Warlow). 46 | * Fixed adding wrong prefixes to `content` (by Luke Warlow). 47 | * Fix `ReferenceError: Can't find variable: URL` (#213) 48 | 49 | ## 10.2.5.1 50 | * Remove nodejs version check via ExecJS, to be compatible with 2.8.1 (#203) 51 | 52 | ## 10.2.5.0 53 | * Fixed `:` support in `@supports` (by Dmitry Semigradsky). 54 | * Update Can I Use data. 55 | * Lock to execjs < 2.8.0 for now (#203) 56 | 57 | ## 10.2.4.0 58 | * Fixed `transition-property` warnings (by @Sheraff). 59 | 60 | ## 10.2.0.0 "Sub rosa" 61 | * Added TypeScript definitions (by Dmitry Semigradsky). 62 | * Fixed docs (by Florian Pellet). 63 | * Update Can I Use data. 64 | * Update postcss to 8.2.2 65 | 66 | ## 10.1.0.0 "Pula" 67 | * Fixed `Cannot read property 'proxyOf' of undefined` error (by Igor Kamyshev). 68 | * Added `dpcm` unit support to `min-resolution: 2dppx` (by Robert Eisele). 69 | * Fixed rational approximation in `min-resolution` (by Robert Eisele). 70 | 71 | ## 10.0.3.0 72 | * Fixed `substract` to `subtract` value for `mask-composite` (by Michelle Enos). 73 | * Update Can I Use data 74 | 75 | ## 10.0.2.0 76 | * Removed -ms-user-select: all because IE and old Edge don’t support it. 77 | * Fixed Grid Layout warning. 78 | * Update Can I Use data 79 | 80 | ## 10.0.1.3 81 | * Fix `fileURL.replace is not a function` when reporting warnings (#194) 82 | 83 | ## 10.0.1.2 84 | * Workaround `existsSync not a function` (#193) 85 | 86 | ## 10.0.1.1 87 | * Update Can I Use data. 88 | * Update postcss to 8.1.4 89 | * Fix issue with source map (#190) 90 | 91 | ## 10.0.1.0 92 | * Update Can I Use data. 93 | * Update autoprefixer to 10.0.1 94 | * Update postcss to 8.1.1 95 | 96 | ## 10.0.0.2 97 | * Update postcss to 8.0.5 98 | * Update browserslist & caniuse-lite 99 | 100 | ## 10.0.0.1 101 | * Improved error message for old environments. 102 | * Reduced gem file size. 103 | 104 | ## 10.0 “Alis volat propriis” 105 | * Removed support for Node.js 6.x, 8.x, 11.x. 106 | * Moved to PostCSS 8. 107 | 108 | ## 9.8.6.5 109 | * Fix `9.8.6.4` regression. 110 | 111 | ## 9.8.6.4 112 | * Remove deprecation warnings. 113 | 114 | ## 9.8.6.3 115 | * Fix deprecation warning for non-Rails environment. 116 | 117 | ## 9.8.6.2 118 | * Print deprecation warning only once. 119 | 120 | ## 9.8.6.1 121 | * Improve deprecated warnings. 122 | 123 | ## 9.8.6 124 | * Fixed `env` option. 125 | * Added deprecation warning. 126 | 127 | ## 9.8.5 128 | * Improved Grid Layout warnings (by Daniel Tonon). 129 | 130 | ## 9.8.4 131 | * Reduce JS bundle size. 132 | 133 | ## 9.8.3 134 | * Update Can I Use data. 135 | 136 | ## 9.8.2 137 | * Update Can I Use data. 138 | 139 | ## 9.8.1 140 | * Replace `chalk` to `kleur` (by Luke Edwards). 141 | 142 | ## 9.8 “Vigilo Confido” 143 | * Add `:placeholder-shown` support (by Tanguy Krotoff). 144 | 145 | ## 9.7.6 146 | * Revert `-webkit-stretch` fix. 147 | 148 | ## 9.7.5 149 | * Fix `-webkit-stretch` support. 150 | * Reduce gem file size. 151 | 152 | ## 9.7.4 153 | * Update Can I Use data. 154 | 155 | ## 9.7.3 156 | * Update Can I Use data. 157 | 158 | ## 9.7.2 159 | * Add `-ms-user-select: element` support. 160 | 161 | ## 9.7.1 162 | * Avoid unnecessary transitions in prefixed selectors (by Andrey Alexandrov). 163 | * Fix `fit-content` for Firefox. 164 | 165 | ## 9.7 “Ad Victoriam” 166 | * Add `AUTOPREFIXER_GRID` env variable to enable Grid Layout polyfill for IE. 167 | * Fix `Cannot read property 'grid' of undefined` error. 168 | 169 | ## 9.6.5 170 | * Fix selector prefixing (by Andrey Alexandrov). 171 | 172 | ## 9.6.4 173 | * Now the real fix for `'startsWith' of undefined` error. 174 | 175 | ## 9.6.3 176 | * Fix `Cannot read property 'startsWith' of undefined` error. 177 | 178 | ## 9.6.2 179 | * Fix false `Replace fill to stretch` warning. 180 | 181 | ## 9.6.1.1 182 | * Update Can I Use data. 183 | 184 | ## 9.6.1 185 | * Fix `-webkit-line-clamp` truncating multi-line text support. 186 | 187 | ## 9.6 “Nunc id vides, nunc ne vides” 188 | * Add warning-less `overrideBrowserslist` option. 189 | * Add `text-orientation` support. 190 | * Add `min-resolution: 2x` alias support. 191 | 192 | ## 9.5.1.1 193 | * Fix `register_postprocessor' for nil:NilClass` error. 194 | * Update Can I Use data. 195 | 196 | ## 9.5.1 197 | * Fix `backdrop-filter` for Edge (by Oleh Aloshkin). 198 | * Fix `min-resolution` media query support in Firefox < 16. 199 | 200 | ## 9.5 “Draco dormiens nunquam titillandus” 201 | * Add `mask-composite` support (by Semen Levenson). 202 | 203 | ## 9.4.10.2 204 | * Fix Ruby < 2.4 support (by Jack Ford). 205 | * Update Can I Use data. 206 | 207 | ## 9.4.10.1 208 | * Fix non-Rails environments support (by Junya Ogura). 209 | * Update Can I Use data. 210 | 211 | ## 9.4.10 212 | * Add warning for named Grid rows. 213 | 214 | ## 9.4.9 215 | * Fix `grid-template` and `@media` case (by Bogdan Dolin). 216 | 217 | ## 9.4.8 218 | * Fix `calc()` support in Grid gap. 219 | 220 | ## 9.4.7 221 | * Fix infinite loop on mismatched parens. 222 | 223 | ## 9.4.6 224 | * Fix warning text (by Albert Juhé Lluveras). 225 | 226 | ## 9.4.5 227 | * Fix `text-decoration-skip-ink` support. 228 | 229 | ## 9.4.4 230 | * Use `direction` value for `-ms-writing-mode` (by Denys Kniazevych). 231 | * Fix warning text (by @zzzzBov). 232 | 233 | ## 9.4.3 234 | * Add warning to force `flex-start` instead of `start` (by Antoine du Hamel). 235 | 236 | ## 9.4.2 237 | * Fix Grid autoplacement warning. 238 | 239 | ## 9.4.1 240 | * Fix unnecessary Flexbox prefixes in Grid elements. 241 | 242 | ## 9.4 “Advance Australia” 243 | * Add Grid autoplacement for `-ms-` (by Bogdan Dolin). 244 | * Improve warnings (by Daniel Tonon). 245 | * Remove some unnecessary warnings for Grid (by Andrey Alexandrov). 246 | 247 | ## 9.3.1 248 | * Fix Grid prefixes with `repeat()` value (by Bogdan Dolin). 249 | 250 | ## 9.3 “Labor omnia vincit” 251 | * Add `place-self` support (by Bogdan Dolin). 252 | * Fix Grid row/column span inheritance bug (by Bogdan Dolin). 253 | 254 | ## 9.2.1 255 | * Update Can I Use data. 256 | 257 | ## 9.2 “Ony est glavnaya krepost” 258 | * Add `/* autoprefixer grid: on */` control comment (by Andrey Alexandrov). 259 | * Add duplicate `grid-area` support (by Bogdan Dolin). 260 | * Fix `grid-gap` support for rules with different specifity (by Bogdan Dolin). 261 | * Disable Grid in `@supports` at-rule with non-supported Grid features. 262 | * Improve Grid warnings (by Daniel Tonon). 263 | 264 | ## 9.1.4 265 | * Fix `ExecJS` runtime test (by Patrice Chalin). 266 | 267 | ## 9.1.3 268 | * Sort properties in `rake autoprefixer` alphabetically. 269 | * Fix old Firefox gradient prefix. 270 | 271 | ## 9.1.2 272 | * Fix `autoprefixer --info` in new Node.js. 273 | * Fix ExecJS runtime warning. 274 | 275 | ## 9.1.1 276 | * Retain `grid-gap` through `@media` (by Bogdan Dolin). 277 | * Fix `grid-template` and `@media` (by Bogdan Dolin). 278 | * Fix Grid areas searching error (by Bogdan Dolin). 279 | * Fix `span X` Grid prefix (by Bogdan Dolin). 280 | * Fix `log2` error. 281 | 282 | ## 9.1 “Equality before the law” 283 | * Add `background-clip: text` support. 284 | * Fix adding Grid span for IE (by Bogdan). 285 | 286 | ## 9.0.2 287 | * Show warning on Grid area names conflict (by Bogdan). 288 | * Fix ExecJS warning (by Jan Kmet). 289 | 290 | ## 9.0.1 291 | * Fix nested at-rules in Grid prefixes (by Ivan Malov). 292 | 293 | ## 9.0 “A Mari Usque Ad Mare” 294 | * Remove Node.js 9 and Node.js 4 support. 295 | * Remove RubyRacer and Sprockets 3 support. 296 | * Use PostCSS 7.0. 297 | * Use Browserslist 4.0. 298 | 299 | ## 8.6.5 300 | * Do not show Grid warnings if IE was not selected. 301 | 302 | ## 8.6.4 303 | * Fix `stretch` prefix in Chrome >= 46. 304 | 305 | ## 8.6.3 306 | * Add warnings for unsupported Grid features. 307 | * Add warnings about wrong Grid properties. 308 | * Add note about `grid` option for grid properties in `rake autoprefixer`. 309 | 310 | ## 8.6.2 311 | * Fix error during adding Grid prefixes in `@media` (by Evgeny Petukhov). 312 | 313 | ## 8.6.1 314 | * Fix `grid-template` with media queries (by Evgeny Petukhov). 315 | 316 | ## 8.6 “Follow Reason” 317 | * Add `gap` support (by Evgeny Petukhov). 318 | * Add two values support for `grid-gap` and `gap` (by Evgeny Petukhov). 319 | 320 | ## 8.5.2 321 | * Fix `grid-template` support wit auto row sizes (by Yury Timofeev). 322 | 323 | ## 8.5.1 324 | * Remove unnecessary warning on `-webkit-fill-available`. 325 | 326 | ## 8.5 “Muito Nobre e Sempre Leal” 327 | * Add `grid-gap` support (by Evgeny Petukhov). 328 | * Fix radial gradients direction fix. 329 | 330 | ## 8.4.1 331 | * Fix non-related to Ruby issue. 332 | 333 | ## 8.4 “Non in aves, sed in angues” 334 | * Add `/* autoprefixer: ignore next */` control comment (by Pavel Vostrikov). 335 | 336 | ## 8.3.0.1 337 | * Remove Opera Mobile 12.1 from default browsers. 338 | * Update Can I Use data. 339 | 340 | ## 8.3 “Benigno Numine” 341 | * Add `@media` support to `grid-template` (by Evgeny Petukhov). 342 | * Fix `radial-gradient` direction warning (by Gustavo Real). 343 | 344 | ## 8.2 “Ad Astra per Aspera” 345 | * Add `color-adjust` (by Sergey Lysenko, Stanislav Botev, and Yuriy Alekseyev). 346 | 347 | ## 8.1.0.1 348 | * Add more clear error on missed browser version. 349 | 350 | ## 8.1 “Rex, Familia et Ultio” 351 | * Add `overscroll-behavior` support. 352 | * Add `grid-template` shortcut support (by Evgeny Petukhov). 353 | * Add better `grid-column-end` and `grid-row-end` support (by Evgeny Petukhov). 354 | * Fix Grid properties support in `@supports`. 355 | 356 | ## 8.0 “Excelsior” 357 | * Use Browserslist 3.0. 358 | * Remove `break-*` to `page-break-*` conversion for Firefox. 359 | 360 | ## 7.2.6 361 | * Fix `-ms-` prefix for grid cells with same `grid-area` (by Evgeny Petukhov). 362 | 363 | ## 7.2.5 364 | * Fix multiple prefixes in declaration value. 365 | 366 | ## 7.2.4 367 | * Update Can I Use data. 368 | 369 | ## 7.2.3 370 | * Fix `grid-template-areas` in `@media` (by Evgeny Petukhov). 371 | 372 | ## 7.2.2 373 | * Fix `_autoprefixerDisabled is undefined` issue. 374 | 375 | ## 7.2.1 376 | * Fix IE and other old JS runtimes support. 377 | 378 | ## 7.2 “Ordem e Progresso” 379 | * Add `grid-template-areas` support (by Evgeny Petukhov). 380 | * Add `grid-template` support (by Evgeny Petukhov). 381 | * Add `grid-area` support (by Alexey Komarov). 382 | * Add `autoprefixer-info` CLI tool. 383 | * Add wrong `radial-gradient` properties warning. 384 | * Use current working dir on missed `from` in `info()` (by Phil Dokas). 385 | * Fix `grid-row` and `grid-column` support (by Alexey Komarov). 386 | * Do not prefix `reverse` animation direction. 387 | * Improve test coverage (by Dmitry Semigradsky). 388 | 389 | ## 7.1.6 390 | * Add warning for using `browserslist` option instead of `browsers`. 391 | * Add warning for multiple control comments in the same scope. 392 | * Fix `Invalid array length` error during indent changes. 393 | 394 | ## 7.1.5 395 | * Fix `::placeholder` prefix for Edge. 396 | * Fix `inherit`/`initial`/`unset` values for `flex-direction`. 397 | * Fix RegExp usage in gradients (by Yet Another Minion). 398 | 399 | ## 7.1.4.1 400 | * Update PostCSS. 401 | * Update Can I Use data. 402 | 403 | ## 7.1.4 404 | * Fix `radial-gradient` direction conversion. 405 | * Fix `image-set` in `cursor`. 406 | 407 | ## 7.1.3 408 | * Add warning for old `radial-gradient` direction syntax. 409 | * Add `last n major versions` browser query. 410 | 411 | ## 7.1.2.6 412 | * Fix `.browserslistrc` support 413 | 414 | ## 7.1.2.5 415 | * Fix `> 0` query for browsers with one version. 416 | * Update Can I Use data. 417 | 418 | ## 7.1.2.4 419 | * Add `unreleased versions` and `unreleased Chrome versions` browsers queries. 420 | * Update Can I Use data. 421 | 422 | ## 7.1.2.3 423 | * Add region usage statistics support. 424 | * Fix base64 decoding for old Node.js. 425 | * Update Can I Use data. 426 | 427 | ## 7.1.2.2 428 | * Fix working with empty `autoprefixer.yml` (by Murahashi Kenichi). 429 | 430 | ## 7.1.2.1 431 | * Fix loading `autoprefixer.yml` from engines (by Jim Ryan). 432 | 433 | ## 7.1.2 434 | * Fix `text-decoration` shortcut support. 435 | 436 | ## 7.1.1.3 437 | * Update Can I Use data. 438 | * Update PostCSS. 439 | 440 | ## 7.1.1.2 441 | * Update Can I Use data. 442 | * Update Browserslist. 443 | 444 | ## 7.1.1.1 445 | * Update Can I Use data. 446 | * Update Browserslist. 447 | * Update PostCSS. 448 | 449 | ## 7.1.1 450 | * Remove non-`-webkit-` intrinsic prefixes in Grid Layout (by 一丝). 451 | 452 | ## 7.1 “Universitas litterarum” 453 | * Add `unicode-bidi` support. 454 | * Add `-webkit-appearance` support for Edge. 455 | * Fix intrinsic widths prefixes in Grid Layout. 456 | 457 | ## 7.0.1 458 | * Fix `therubyracer` support. 459 | 460 | ## 7.0 “Coelestem adspicit lucem” 461 | * Remove node.js 0.12 support. 462 | * Use PostCSS 6.0. 463 | * Use Browserslist 2. 464 | * Use `caniuse-lite` instead of `caniuse-db` (by Ben Briggs). 465 | * Rewrite project from CoffeeScript to Babel (by Dmitry Semigradsky). 466 | * Disable Grid Layout prefixes for IE by default. 467 | * Fix `-ms-grid-column-align`. 468 | 469 | ## 6.7.7.2 470 | * Update Can I Use data. 471 | * Update PostCSS. 472 | 473 | ## 6.7.7.1 474 | * Update Firefox ESR. 475 | * Update Can I Use data. 476 | 477 | ## 6.7.7 478 | * Fix `order` for non-digit values. 479 | 480 | ## 6.7.6 481 | * Fix `font-kerning` (by Chi Vinh Le). 482 | 483 | ## 6.7.5 484 | * Fix `text-decoration-skip` in iOS (by Chi Vinh Le). 485 | * Fix `clip-path` (by Chi Vinh Le). 486 | 487 | ## 6.7.4 488 | * Improve `browsers` option perfomance. 489 | * Update CoffeeScript compiler. 490 | 491 | ## 6.7.3 492 | * Fix compatibility with “Intrinsic & Extrinsic Sizing” spec update. 493 | 494 | ## 6.7.2 495 | * Do not prefix grid/flexbox in `@supports` on `grid: false`/`flexbox: false`. 496 | 497 | ## 6.7.1 498 | * Update Browserslist to fix `last n version` query. 499 | * Update Can I Use data. 500 | 501 | ## 6.7 “Krungthep doot thep saang” 502 | * Add Electron support in browsers list (by Kilian Valkhof). 503 | * Add `flex-flow` partial support for Flexbox 2009 specification. 504 | * Fix browsers `0` version issue in some Can I Use data. 505 | 506 | ## 6.6.1 507 | * Update Can I Use data. 508 | 509 | ## 6.6 “Kaiyuan” 510 | * Add support for separated environments in browserslist config. 511 | 512 | ## 6.5.4 513 | * Fix unitless 0 basis in IE10/IE11 shorthand flex (by Google). 514 | 515 | ## 6.5.3.1 516 | * Update PostCSS to 5.2.6. 517 | * Update Can I Use data. 518 | 519 | ## 6.5.3 520 | * Add error for popular mistake with `browser` option instead of `browsers`. 521 | 522 | ## 6.5.2 523 | * Clean prefixes data (by Reinaldo Schiehll). 524 | 525 | ## 6.5.1.1 526 | * Better syntax error messages with PostCSS 5.2.5. 527 | * Update Can I Use data. 528 | 529 | ## 6.5.1 530 | * Fix selectors with `:--` prefix support. 531 | 532 | ## 6.5.0.2 533 | * Better CSS highlight by PostCSS 5.2.4. 534 | * Update Can I Use data. 535 | 536 | ## 6.5.0.1 537 | * Better syntax error output by PostCSS 5.2.3. 538 | * Update Can I Use data. 539 | 540 | ## 6.5 “Einigkeit und Recht und Freiheit” 541 | * Add `defaults` keyword to browsers requirements. 542 | * Fix CSS Grid Layout support. 543 | * Fix `align-self` cleaning. 544 | 545 | ## 6.4.1.1 546 | * Better syntax error output by PostCSS 5.2. 547 | * Update Can I Use data. 548 | 549 | ## 6.4.1 550 | * Fix node cloning. 551 | 552 | ## 6.4.0.3 553 | * Update Browserslist. 554 | * Update Can I Use data. 555 | 556 | ## 6.4.0.2 557 | * Fix `autoprefixer.js` loading path in some cases (by Pavan Trikutam) 558 | * Update Can I Use data. 559 | 560 | ## 6.4.0.1 561 | * Fix Sprockets 3 support (by Eda Riedl). 562 | 563 | ## 6.4 “Hic et ubique terrarum” 564 | * Add `:any-link` selector support. 565 | * Add `text-decoration-skip` support. 566 | * Add `transition: duration property` support. 567 | * Fix `-webkit-` prefix for `backface-visibility`. 568 | * Fix `rad` unit support in gradients (by 刘祺). 569 | * Fix `transition` support in Opera 12. 570 | * Fix warning in Sprokets 3. 571 | * Removed Safari TP Grid prefixes support. 572 | 573 | ## 6.3.7 574 | * Fix `browserslist` path detection (by Jose Luis Salas). 575 | * Fix rare `Cannot read property 'constructor' of null` issue. 576 | * Add space-less `>1%` and `>.5%` syntax support. 577 | * Clean `0` versions in some country-based requests. 578 | * Update Can I Use data. 579 | 580 | ## 6.3.6.2 581 | * Update Firefox ESR. 582 | * Update Can I Use data. 583 | 584 | ## 6.3.6.1 585 | * Fix source map for Sprockets 4 (by Richard Schneeman). 586 | 587 | ## 6.3.6 588 | * Add Safari TP prefix support for Grid Layout. 589 | 590 | ## 6.3.5 591 | * Fix duplicate prefixes for `-ms-interpolation-mode`. 592 | 593 | ## 6.3.4 594 | * Show users coverage for selected browsers in `.info` and Rake task. 595 | 596 | ## 6.3.3.1 597 | * Add Sprockets 4 support (by Richard Schneeman). 598 | * Add `AutoprefixerRails.uninstall()`. 599 | * Use `bundle_processor` for Sprockets 4 (by Adam Becker). 600 | * Clean gem dependency from `json` (by deepj). 601 | 602 | ## 6.3.3 603 | * Fix transition warning. 604 | 605 | ## 6.3.2 606 | * Update Can I Use data. 607 | 608 | ## 6.3.1 609 | * Fix compatibility with Flexibility polyfill. 610 | 611 | ## 6.3 “Pro rege et lege” 612 | * Add Grid Layout support. 613 | * Add `text-spacing` support. 614 | * Add `> 10% in my stats` browsers query with custom usage statistics. 615 | * Add options to disable `@supports`, Flexbox or Grid support. 616 | * Fix compatibility with other PostCSS plugins. 617 | 618 | ## 6.2.3 619 | * Fix error on broken transition with double comma. 620 | 621 | ## 6.2.2 622 | * Fix issues in broken transitions. 623 | 624 | ## 6.2.1 625 | * Fix AST error in transition warning (by @jvdanilo). 626 | 627 | ## 6.2 “Fluctuat nec mergitur” 628 | * Use `fill` instead of `fill-available` according spec changes (by 一丝). 629 | * Add `fill` support for logical dimension properties (by 一丝). 630 | * Add `text-emphasis` support (by 一丝). 631 | * Add prefixes to `@supports` only for compatible browsers. 632 | * Add `rad`, `grad` and `turn` units support to linear gradients. 633 | * Add some `deg` directions support for old WebKit linear gradients. 634 | * Fix `@supports` parenthesis (by @heady). 635 | * Fix Rails without Assets Pipeline support (by Zach Denton). 636 | * Add warning when prefixes could not be generated 637 | for complicated `transition-property` values. 638 | * Add warning for outdated `fill-available` value. 639 | * Add warning for wrong `text-emphasis-position` value. 640 | * Add “time capsule” warning for prefix-less future. 641 | * Normalizes all warning messages. 642 | 643 | ## 6.1.2 644 | * Fix gradient hack on some parameters (by Alexey Efremov). 645 | 646 | ## 6.1.1 647 | * Fix `cursor: grab` and `cusror: grabbing` support. 648 | 649 | ## 6.1.0.1 650 | * Return old Rails integration to fix strange issues. 651 | 652 | ## 6.1 “Bil-shaʿb wa lil-shaʿb” 653 | * Change `transition` support to output more robust CSS. 654 | * Add `:read-only` support. 655 | * Add support for `appearance` with any values. 656 | * Add loud `/*! autoprefixer: off */` control comments support. 657 | * Convert `rotateZ` to `rotate` for `-ms-transform`. 658 | * Use `postcss-value-parser` to carefully work with gradients. 659 | * Remove `-ms-transform-style` and `-o-transform-style` that never existed. 660 | 661 | ## 6.0.3 662 | * Fix old gradient direction warning. 663 | 664 | ## 6.0.2 665 | * Remove unnecessary `-khtml-` prefix too. 666 | 667 | ## 6.0.1 668 | * Fix `cross-fade()` support (by 一丝). 669 | 670 | ## 6.0 “Eureka” 671 | * Remove Ruby on Rails 3 support. 672 | * Remove Ruby 1.9 support. 673 | * Remove `safe` option. 674 | * Remove Opera 12.1 from default query. 675 | * Add `image-set` support (by 一丝). 676 | * Add `mask-border` support (by 一丝). 677 | * Add `filter()` function support (by Vincent De Oliveira). 678 | * Add `backdrop-filter` support (by Vincent De Oliveira). 679 | * Add `element()` support (by Vincent De Oliveira). 680 | * Add CSS Regions support. 681 | * Add Scroll Snap Points support. 682 | * Add `writing-mode` support. 683 | * Add `::backdrop` support. 684 | * Add `cross-fade()` support. 685 | * Add other `break-` properties support. 686 | * Add Microsoft Edge support (by Andrey Polischuk). 687 | * Add `not` keyword and exclude browsers by query. 688 | * Add version ranges `IE 6-9` (by Ben Briggs). 689 | * Fix `filter` in `transition` support on Safari. 690 | * Fix `url()` parsing. 691 | * Fix `pixelated` cleaning. 692 | * Always show old gradient direction warning. 693 | 694 | ## 5.2.1.3 695 | * Update Can I Use database. 696 | * Update internal libraries. 697 | 698 | ## 5.2.1.2 699 | * Update Can I Use database. 700 | * Update internal libraries. 701 | 702 | ## 5.2.1.1 703 | * Update Can I Use database. 704 | * Update internal libraries. 705 | 706 | ## 5.2.1 707 | * Fix parent-less node issue on some cases (by Josh Gillies) 708 | 709 | ## 5.2.0.1 710 | * Update Can I Use database. 711 | 712 | ## 5.2 “Dont tread on me” 713 | * Add `appearance` support. 714 | * Warn users on old gradient direction or flexbox syntax. 715 | * Add `add: false` option to disable new prefixes adding. 716 | * Make Autoprefixer 30% faster. 717 | * Add prefixes for `pixelated` instead of `crisp-edges` in `image-rendering`. 718 | * Do not add `::placeholder` prefixes for `:placeholder-shown`. 719 | * Fix `text-decoration` prefixes. 720 | 721 | ## 5.1.11 722 | * Update num2fraction to fix resolution media quuery (by 一丝). 723 | 724 | ## 5.1.10 725 | * Do not generate `-webkit-image-rendering`. 726 | 727 | ## 5.1.9 728 | * Fix DynJS compatibility (by Nick Howes). 729 | 730 | ## 5.1.8.1 731 | * Update Can I Use database. 732 | 733 | ## 5.1.8 734 | * Fix gradients in `mask` and `mask-image` properties. 735 | * Fix old webkit prefix on some unsupported gradients. 736 | 737 | ## 5.1.7.1 738 | * Update Can I Use database and JS libraries. 739 | * Better support with Alaska runtime (by Jon Bardin). 740 | 741 | ## 5.1.7 742 | * Fix placeholder selector (by Vincent De Oliveira). 743 | 744 | # 5.1.6 745 | * Use official `::placeholder-shown` selector (by Vincent De Oliveira). 746 | * Fix problem with rails-html-sanitizer (by Alexey Vasiliev). 747 | 748 | # 5.1.5 749 | * Add transition support for CSS Masks properties. 750 | 751 | # 5.1.4 752 | * Use `-webkit-` prefix for Opera Mobile 24. 753 | 754 | # 5.1.3.1 755 | * Fix Rails 5 support (by Joshua Peek). 756 | 757 | # 5.1.3 758 | * Add IE support for `image-rendering: crisp-edges`. 759 | 760 | # 5.1.2 761 | * Add never existed `@-ms-keyframes` to common mistake. 762 | 763 | ## 5.1.1 764 | * Safer value split in `flex` hack. 765 | 766 | ## 5.1 “Jianyuan” 767 | * Add support for resolution media query (by 一丝). 768 | * Higher accuracy while removing prefixes in values. 769 | * Add support for logical properties (by 一丝). 770 | * Add `@viewport` support. 771 | * Add `text-overflow` support (by 一丝). 772 | * Add `text-emphasis` support (by 一丝). 773 | * Add `image-rendering: crisp-edges` support. 774 | * Add `text-align-last` support. 775 | * Return `autoprefixer.defaults` as alias to current `browserslist.defaults`. 776 | * Save code style while adding prefixes to `@keyframes` and `@viewport`. 777 | * Do not remove `-webkit-background-clip` with non-spec `text` value. 778 | * Fix `-webkit-filter` in `transition`. 779 | * Better support for browser versions joined on Can I Use 780 | like `ios_saf 7.0-7.1` (by Vincent De Oliveira). 781 | * Fix compatibility with `postcss-import` (by Jason Kuhrt). 782 | * Fix Flexbox prefixes for BlackBerry and UC Browser. 783 | * Fix gradient prefixes for old Chrome. 784 | 785 | ## 5.0.0.3 786 | * Fix error on `nil` in processor params. 787 | 788 | ## 5.0.0.2 789 | * Fix for non-Rails environments. 790 | * Add notice about unsupported ExecJS runtimes. 791 | * Update Can I Use data. 792 | 793 | ## 5.0.0.1 794 | * Fix issue on node.js runtime. 795 | 796 | ## 5.0 “Pravda vítězí” 797 | * Use PostCSS 4.0. 798 | * Use Browserslist to parse browsers queries. 799 | * Use global `browserslist` config. 800 | Key `browsers` in `config/autoprefixer.yml` is now deprecated. 801 | * Add `> 5% in US` query to select browsers by usage in some country. 802 | * Add `object-fit` and `object-position` properties support. 803 | * Add CSS Shape properties support. 804 | * Fix UC Browser name in debug info. 805 | 806 | ## 4.0.2.2 807 | * Update Can I Use data. 808 | * Update some npm dependencies. 809 | 810 | ## 4.0.2.1 811 | * Fix IE filter parsing with multiple commands. 812 | * Update Can I Use dump. 813 | 814 | ## 4.0.2 815 | * Remove `o-border-radius`, which is common mistake in legacy CSS. 816 | 817 | ## 4.0.1.1 818 | * Use PostCSS 3.0.5 to parse complicated cases of CSS syntax. 819 | * Update Can I Use dump. 820 | 821 | ## 4.0.1 822 | * Fix `@supports` support with brackets in values (by Vincent De Oliveira). 823 | * Fix Windows support (by Kamen Hursev). 824 | 825 | ## 4.0.0.1 826 | * Update PostCSS to fix issue with empty comment. 827 | 828 | ## 4.0 “Indivisibiliter ac Inseparabiliter” 829 | * Become 2.5 times fatser by new PostCSS 3.0 parser. 830 | * Do not remove outdated prefixes by `remove: false` option. 831 | * `map.inline` and `map.sourcesContent` options are now `true` by default. 832 | * Add `box-decoration-break` support. 833 | * Do not add old `-webkit-` prefix for gradients with `px` units. 834 | * Use previous source map to show origin source of CSS syntax error. 835 | * Use `from` option from previous source map `file` field. 836 | * Set `to` value to `from` if `to` option is missing. 837 | * Trim Unicode BOM on source maps parsing. 838 | * Parse at-rules without spaces like `@import"file"`. 839 | * Better previous `sourceMappingURL` annotation comment cleaning. 840 | * Do not remove previous `sourceMappingURL` comment on `map.annotation: false`. 841 | 842 | ## 3.1.2 843 | * Update Firefox ESR version from 24 to 31. 844 | 845 | ## 3.1.1 846 | * Use Flexbox 2009 spec for Android stock browser < 4.4. 847 | 848 | ## 3.1 “Satyameva Jayate” 849 | * Do not remove comments from prefixed values (by Eitan Rousso). 850 | * Allow Safari 6.1 to use final Flexbox spec (by John Kreitlow). 851 | * Fix `filter` value in `transition` in Webkits. 852 | * Show greetings in Rake task if your browsers don’t require any prefixes. 853 | * Add `<=` and `<` browsers requirement (by Andreas Lind). 854 | 855 | ## 3.0.1 856 | * Update Can I Use data. 857 | 858 | ## 3.0 “Liberté, Égalité, Fraternité” 859 | * All methods now receive browsers as options key, not separated argument. 860 | * GNU format for syntax error messages from PostCSS 2.2. 861 | 862 | ## 2.2.20140804 863 | * Fix UTF-8 support in inline source maps. 864 | * Allow to miss `from` and `to` options in inline source maps. 865 | * Update Can I Use data. 866 | 867 | ## 2.2 “Mobilis in mobili” 868 | * Allow to disable Autoprefixer for some rule by control comment. 869 | * Use PostCSS 2.1 with Safe Mode option and broken source line 870 | in CSS syntax error messages. 871 | 872 | ## 2.1.1 873 | * Fix `-webkit-background-size` hack for `contain` and `cover` values. 874 | * Don’t add `-webkit-` prefix to `filter` with SVG (by Vincent De Oliveira). 875 | 876 | ## 2.1 “Eleftheria i thanatos” 877 | * Add support for `clip-path` and `mask` properties. 878 | * Return `-webkit-` prefix to `filter` with SVG URI. 879 | 880 | ## 2.0.2 881 | * Add readable names for new browsers from 2.0 release. 882 | * Don’t add `-webkit-` prefix to `filter` with SVG URI. 883 | * Don’t add `-o-` prefix 3D transforms. 884 | 885 | ## 2.0.1 886 | * Save declaration style, when clone declaration to prefix. 887 | 888 | ## 2.0 “Hongik Ingan” 889 | * Based on PostCSS 1.0. 890 | See [options changes](https://github.com/postcss/postcss/releases/tag/1.0.0). 891 | * Restore visual cascade after declaration removing. 892 | * Prefix declareation in `@supports` at-rule conditions. 893 | * Add all browsers from Can I Use: `ie_mob`, `and_chr`, `and_ff`, 894 | `op_mob` and `op_mini`. 895 | 896 | ## 1.3.1 897 | * Fix gradient hack, when `background` property contains color. 898 | 899 | ## 1.3 “Tenka Fubu” 900 | * Add `text-size-adjust` support. 901 | * Add `background-size` to support Android 2. 902 | * Update Can I Use data. 903 | 904 | ## 1.2 “Meiji” 905 | * Use Can I Use data from official `caniuse-db` npm package. 906 | * Change versions to `x.x.x.y`, where `x.x.x` is Autoprefixer npm version 907 | and `y` is a `caniuse-db` date. 908 | 909 | ## 1.1 “Nutrisco et extingo” 910 | * Add source map annotation comment support. 911 | * Add inline source map support. 912 | * Autodetect previous inline source map. 913 | * Fix source maps support on Windows. 914 | * Fix source maps support in subdirectory. 915 | * Prefix selector even if it is already prefixed by developer. 916 | * Change CSS indentation to create nice visual cascade of prefixes. 917 | * Fix flexbox support for IE 10 (by Roland Warmerdam). 918 | * Better `break-inside` support. 919 | * Fix prefixing, when two same properties are near. 920 | 921 | ### 20140222: 922 | * Add `touch-action` support. 923 | 924 | ### 20140226: 925 | * Chrome 33 is moved to released versions. 926 | * Add Chrome 36 data. 927 | 928 | ### 20140302: 929 | * Add `text-decoration-*` properties support. 930 | * Update browsers usage statistics. 931 | * Fix `cascade` options without `browsers` option (by Dominik Porada). 932 | * Use new PostCSS version. 933 | 934 | ### 20140319: 935 | * Check already prefixed properties after current declaration. 936 | * Normalize spaces before already prefixed check. 937 | * Firefox 28 is moved to released versions. 938 | * Add Firefox 31 data. 939 | * Add some Blackberry data. 940 | 941 | ## 20140327: 942 | * Don’t use `-ms-transform` in `@keyframes`, because IE 9 doesn’t support 943 | animations. 944 | * Update BlackBerry 10 data. 945 | 946 | ## 20140403: 947 | * Update browsers usage statistics. 948 | * Opera 20 is moved to released versions. 949 | * Add Opera 22 data. 950 | 951 | ## 20140410: 952 | * Chrome 34 is moved to released versions. 953 | * Add Chrome 37 data. 954 | * Fix Chrome 36 data. 955 | 956 | ## 20140429: 957 | * Fix `display: inline-flex` support by 2009 spec. 958 | * Fix old WebKit gradient converter (by Sergey Belov). 959 | 960 | ## 20140430: 961 | * Separate 2D and 3D transform prefixes to clean unnecessary `-ms-` prefixes. 962 | * Firefox 29 is moved to released versions. 963 | * Add Firefox 32 data. 964 | 965 | ### 20140510 966 | * Do not add `-ms-` prefix for `transform` with 3D functions. 967 | * Update browsers global usage statistics. 968 | 969 | ### 20140512 970 | * Remove unnecessary `-moz-` prefix for `wavy` in `text-decoration`. 971 | * Update Safari data for font properties. 972 | 973 | ### 20140521 974 | * Chrome 36 is moved to released versions. 975 | * Add Chrome 38 data. 976 | 977 | ### 20140523 978 | * Opera 21 is moved to released versions. 979 | * Add Opera 23 data. 980 | 981 | ### 20140605 982 | * Allow to parse gradients without space between color and position. 983 | * Add iOS 8, Safari 8 and Android 4.4.3 data. 984 | * Update browsers usage statistics. 985 | 986 | ## 1.0 “Plus ultra” 987 | * Source map support. 988 | * Save origin indents and code formatting. 989 | * Change CSS parser to PostCSS. 990 | * Keep vendor hacks, which does right after unprefixed property. 991 | * Show syntax errors if fixed sass-rails version if used. 992 | * Rename compile() to process() and return result object, instead of CSS string. 993 | * Rename inspect() to info(). 994 | * Allow to select last versions for specified browser. 995 | * Add full browser names aliases: `firefox`, `explorer` and `blackberry`. 996 | * Ignore case in browser names. 997 | * Change license to MIT. 998 | * Add prefixes inside custom at-rules. 999 | * Add only necessary prefixes to selector inside prefixed at-rule. 1000 | * Safer backgrounds list parser in gradient hack. 1001 | * Prefix @keyframes inside @media. 1002 | * Don’t prefix values for CSS3 PIE properties. 1003 | * Use browserify to build standalone version. 1004 | 1005 | ### 20131225: 1006 | * Add ::placeholder support for Firefix >= 18. 1007 | * Fix vendor prefixes order. 1008 | 1009 | ### 20140103: 1010 | * Add webkit prefix for sticky position. 1011 | * Update browsers popularity statistics. 1012 | 1013 | ### 20140109: 1014 | * Add selectors and at-rules sections to debug info. 1015 | * Fix outdated prefixes cleaning. 1016 | 1017 | ### 20140110: 1018 | * Add `Firefox ESR` browser requirement. 1019 | * Opera 18 is moved to released versions. 1020 | * Add Opera 20 data. 1021 | 1022 | ### 20140117: 1023 | * Chrome 32 is moved to released versions. 1024 | * Add Opera 34 data. 1025 | 1026 | ### 20140130: 1027 | * Fix flexbox properties names in transitions. 1028 | * Add Chrome 35 and Firefox 29 data. 1029 | 1030 | ### 20140203: 1031 | * Android 4.4 stock browser and Opera 19 are moved to released versions. 1032 | * Add Opera 21 data. 1033 | * Update browsers usage statistics. 1034 | 1035 | ### 20140213: 1036 | * Add case insensitive to IE’s filter hack (by Dominik Schilling). 1037 | * Improve selector prefixing in some rare cases (by Simon Lydell). 1038 | * Firefox 27 is moved to released versions. 1039 | * Add Firefox 30 data. 1040 | 1041 | ## 0.8 “Unbowed, Unbent, Unbroken” 1042 | * Add more browsers to defaults ("> 1%, last 2 versions, ff 17, opera 12.1" 1043 | instead of just "last 2 browsers"). 1044 | * Keep vendor prefixes without unprefixed version (like vendor-specific hacks). 1045 | * Convert gradients to old WebKit syntax (actual for Android 2.3). 1046 | * Better support for several syntaxes with one prefix (like Flexbox and 1047 | gradients in WebKit). 1048 | * Add intrinsic and extrinsic sizing values support. 1049 | * Remove never existed prefixes from common mistakes (like -ms-transition). 1050 | * Add Opera 17 data. 1051 | * Fix selector prefixes order. 1052 | * Fix browser versions order in inspect. 1053 | 1054 | ### 20130903: 1055 | * Fix old WebKit gradients convertor on rgba() colors. 1056 | * Allow to write old direction syntax in gradients. 1057 | 1058 | ### 20130906: 1059 | * Fix direction syntax in radial gradients. 1060 | * Don’t prefix IE filter with modern syntax. 1061 | 1062 | ### 20130911: 1063 | * Fix parsing property name with spaces. 1064 | 1065 | ### 20130919: 1066 | * Fix processing custom framework prefixes (by Johannes J. Schmidt). 1067 | * Concat outputs if several files compiled to one output. 1068 | * Decrease standalone build size by removing unnecessary Binary class. 1069 | * iOS 7 is moved to released versions. 1070 | * Clean up binary code (by Simon Lydell). 1071 | 1072 | ### 20130923: 1073 | * Firefox 24 is moved to released versions. 1074 | 1075 | ### 20131001: 1076 | * Add support for grab, grabbing, zoom-in and zoom-out cursor values. 1077 | 1078 | ### 20131006: 1079 | * Chrome 30 is moved to released versions. 1080 | 1081 | ### 20131007: 1082 | * Don’t add another prefixes in rule with prefixed selector. 1083 | 1084 | ### 20131009: 1085 | * Opera 17 is moved to released versions. 1086 | 1087 | ### 20131015: 1088 | * Fix converting multiple gradients to old webkit syntax (by Aleksei Androsov). 1089 | 1090 | ### 20131017: 1091 | * Fix @host at-rule parsing. 1092 | 1093 | ### 20131020: 1094 | * IE 11 and Andrid 4.3 is moved to released versions. 1095 | * Add Opera 18 data. 1096 | * Add @namespace support. 1097 | * Sort browser versions in data file. 1098 | 1099 | ### 20131029: 1100 | * Add Safari 6.1 data. 1101 | * Add fx alias for Firefox. 1102 | 1103 | ### 20131104: 1104 | * Update Android future version to 4.4. 1105 | * Google Chrome 32 added to future versions list. 1106 | * Firefox 25 now is actual version, 27 and 28 added to future versions. 1107 | * Browsers statistics are updated. 1108 | 1109 | ### 20131205: 1110 | * Google Chrome 33 added to future releases list. 1111 | * Google Chrome 31 moved to current releases list. 1112 | 1113 | ### 20131209: 1114 | * Fix Autoprefixer initializer on Heroku (by Jason Purcell). 1115 | * Use old webkit gradients for old iOS and Safari (by Chad von Nau). 1116 | * Fix direction conversion for old webkit gradients (by Chad von Nau). 1117 | * Update browsers popularity statistics. 1118 | 1119 | ### 20131213: 1120 | * Firefox ESR in default browsers was changed to 24 version. 1121 | * Firefox 26 was moved to current releases list. 1122 | * Firefox 28 was added to future releases list. 1123 | 1124 | ## 0.7 “We Do Not Sow” 1125 | * Add vendor prefixes to selectors. 1126 | * Add ::selection and ::placeholder selectors support. 1127 | * Allow to load support data from Can I Use pull requests. 1128 | * Remove deprecated API. 1129 | 1130 | ### 20130806: 1131 | * Add hyphens support. 1132 | 1133 | ### 20130807: 1134 | * Add tab-size support. 1135 | * Add :fullscreen support. 1136 | 1137 | ### 20130808: 1138 | * Allow to select browser versions by > and >= operator. 1139 | * Fix flex properties in transition. 1140 | 1141 | ### 20130810: 1142 | * Add Firefox 25 data. 1143 | 1144 | ### 20130824: 1145 | * Add Chrome 31 and 30 data. 1146 | * Fix CSS comments parsing (by vladkens). 1147 | 1148 | ## 0.6 “As High As Honor” 1149 | * New faster API, which cache preprocessed data. Old API is deprecated. 1150 | * A lot of perfomance improvements. 1151 | * Add Opera 15 -webkit- prefix support. 1152 | * Update Chrome 29 and Safari 7 prefixes data. 1153 | * Add minor browsers in popularity select. 1154 | * Better syntax error messages. 1155 | 1156 | ### 20130721: 1157 | * Add Chrome 30 data. 1158 | 1159 | ### 20130728: 1160 | * Don’t remove non-standard -webkit-background-clip: text. 1161 | * Don’t remove IE hack on CSS parse. 1162 | * Fix loading into Rails without Sprockets. 1163 | 1164 | ### 20130729: 1165 | * Add Opera 16 data. 1166 | * Fix “Invalid range in character class” error on JRuby. 1167 | 1168 | ### 20130730: 1169 | * Fix correct clone comments inside keyframes (by Alexey Plutalov). 1170 | * Fix angle recalculation in gradients (by Roman Komarov). 1171 | 1172 | ### 20130731: 1173 | * Add border-image support. 1174 | 1175 | ## 0.5 “Ours is the Fury” 1176 | * Rewrite Autoprefixer to be more flexible. 1177 | * Use css, instead of Rework, to fix CSS parsing errors faster. 1178 | * Fix a lot of CSS parsing errors. 1179 | * Fix sass-rails 4.0.0.rc2 compatibility. 1180 | 1181 | ### 20130616: 1182 | * More useful message for CSS parsing errors. 1183 | * Remove old WebKit gradient syntax. 1184 | * Fix parsing error on comment with braces. 1185 | 1186 | ### 20130617: 1187 | * Remove old Mozilla border-radius. 1188 | * Don’t prefix old IE filter. 1189 | * Remove old background-clip, background-size and background-origin prefixes. 1190 | * Speed up regexps in values. 1191 | * Allow to hack property declarations. 1192 | 1193 | ### 20130625: 1194 | * Convert flexbox properties to 2009 and 2012 specifications. 1195 | * Add support for sass-rails 4 final. 1196 | 1197 | ### 20130626: 1198 | * Add Firefox 24 data. 1199 | * Add prefixes for font-feature-settings. 1200 | 1201 | ### 20130629: 1202 | * Fix convert flex properties to old box-flex. 1203 | * Fix Sinatra (sprockets-sass) suuport. 1204 | 1205 | ## 0.4 “Winter Is Coming” 1206 | * Remove outdated prefixes. 1207 | * Add border-radius and box-shadow properties to database. 1208 | * Change degrees in webkit gradients. 1209 | 1210 | ### 20130515: 1211 | * Add old syntax in gradient direction. 1212 | * Add old syntax for display: flex. 1213 | * Update browser global usage statistics. 1214 | 1215 | ### 20130521: 1216 | * Add Firefox 23 data. 1217 | * Update css-parse to fix @-moz-document issue. 1218 | 1219 | ### 20130523: 1220 | * Update Rework’s libraries to fix @page statement. 1221 | 1222 | ### 20130524: 1223 | * Add Chrome 29 data. 1224 | 1225 | ### 20130527: 1226 | * Fix new css-stringify issue. 1227 | 1228 | ### 20130528: 1229 | * Fix compatibilty with Rework from git master. 1230 | * Add minor browsers to data, which can be selected only directly. 1231 | 1232 | ### 20130530: 1233 | * Add Opera 15 and iOS 6.1 data. 1234 | * Fix iOS versions in properties and values data. 1235 | 1236 | ### 20130603: 1237 | * Use latest Rework 0.15 with a lot of CSS parsing fixes. 1238 | * Update browsers usage statistics. 1239 | 1240 | ## 0.3 “Growing Strong” 1241 | * Use own filters instead of Rework’s `prefix` and `prefixValue`. 1242 | * Smarter value prefixer without false match “order” in “border”. 1243 | * 40% faster. 1244 | * Don’t add unnecessary properties instead of Rework’s `prefixValue`. 1245 | * Don’t change properties order. 1246 | * Sort properties and values in inspect output. 1247 | 1248 | ### 20130424: 1249 | * Fix value override in prefixer. 1250 | 1251 | ### 20130427: 1252 | * Prefix several same values in one property. 1253 | 1254 | ### 20130502: 1255 | * Don’t add -webkit- prefix to IE filter. 1256 | * Don’t duplicate already prefixed rules. 1257 | 1258 | ## 0.2 “Hear Me Roar!” 1259 | * Update parse libraries. 1260 | * Add inspect method and rake tast. 1261 | 1262 | ## 0.1 “Fire and Blood” 1263 | * Initial release. 1264 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ruby:2.7 2 | WORKDIR /var/app 3 | COPY . /var/app 4 | RUN bundle install 5 | CMD bundle exec rake build -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source "https://rubygems.org" 4 | 5 | gemspec 6 | 7 | gem "execjs", "~> 2" 8 | gem "rails", ">= 5.0.0.beta2" 9 | gem "sassc-rails" 10 | gem "sprockets", ">= 4.0.0.beta1" 11 | 12 | gem "mini_racer" 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2013 Andrey Sitnik 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Autoprefixer Rails [![Build Status][ci-img]][ci] 2 | 3 | 6 | 7 | [Autoprefixer] is a tool to parse CSS and add vendor prefixes to CSS rules 8 | using values from the [Can I Use] database. This gem provides Ruby 9 | and Ruby on Rails integration with this JavaScript tool. 10 | 11 | 12 | Sponsored by Evil Martians 13 | 14 | 15 | [Autoprefixer]: https://github.com/postcss/autoprefixer 16 | [Can I Use]: http://caniuse.com/ 17 | [PostCSS]: https://postcss.org/ 18 | [ci-img]: https://github.com/ai/autoprefixer-rails/actions/workflows/ci.yml/badge.svg 19 | [ci]: https://github.com/ai/autoprefixer-rails/actions/workflows/ci.yml 20 | 21 | ## Differences 22 | 23 | The best way to use Autoprefixer is with webpack or Gulp. 24 | 25 | Autoprefixer Rails doesn’t support these Autoprefixer features: 26 | 27 | * Browsers in `package.json`. 28 | * Custom browsers usage statistics. 29 | 30 | ## Usage 31 | 32 | Windows users should install [Node.js]. Autoprefixer Rails doesn’t work with 33 | old JScript in Windows. 34 | 35 | Autoprefixer Rails uses [ExecJS] that will use the best available JavaScript 36 | runtime. Currently this gem is tested to work with Node.js version 10 and up 37 | and with [mini_racer], but will not work with [therubyracer]. 38 | 39 | [Node.js]: http://nodejs.org/ 40 | [ExecJS]: https://github.com/rails/execjs 41 | [mini_racer]: https://github.com/discourse/mini_racer 42 | [therubyracer]: https://github.com/cowboyd/therubyracer 43 | 44 | ### Ruby on Rails 45 | 46 | Add the `autoprefixer-rails` gem to your `Gemfile`: 47 | 48 | ```ruby 49 | gem "autoprefixer-rails" 50 | ``` 51 | 52 | Clear your cache: 53 | 54 | ```sh 55 | rake tmp:clear 56 | ``` 57 | 58 | Write your CSS (Sass, Stylus, LESS) rules without vendor prefixes 59 | and Autoprefixer will apply prefixes for you. 60 | For example in `app/assets/stylesheet/foobar.sass`: 61 | 62 | ```sass 63 | :fullscreen a 64 | display: flex 65 | ``` 66 | 67 | Autoprefixer uses the Can I Use database with browser statistics and properties 68 | support to add vendor prefixes automatically using the Asset Pipeline: 69 | 70 | ```css 71 | :-webkit-full-screen a { 72 | display: -webkit-box; 73 | display: -webkit-flex; 74 | display: flex 75 | } 76 | :-moz-full-screen a { 77 | display: flex 78 | } 79 | :-ms-fullscreen a { 80 | display: -ms-flexbox; 81 | display: flex 82 | } 83 | :fullscreen a { 84 | display: -webkit-box; 85 | display: -webkit-flex; 86 | display: -ms-flexbox; 87 | display: flex 88 | } 89 | ``` 90 | 91 | If you need to specify browsers for your Rails project, you can save them 92 | to `.browserslistrc` and place it under `app/assets/stylesheets/` 93 | or any of its ancestor directories 94 | 95 | ``` 96 | > 1% 97 | last 2 versions 98 | IE > 8 # comment 99 | ``` 100 | 101 | See [Browserslist docs] for config format. But `> 5% in US` query is not 102 | supported in Rails, because of ExecJS limitations. You should migrate to webpack 103 | or Gulp if you want it. 104 | 105 | __Note: you have to clear cache (`rake tmp:clear`) for the configuration 106 | to take effect.__ 107 | 108 | You can get what properties will be changed using a Rake task: 109 | 110 | ```sh 111 | rake autoprefixer:info 112 | ``` 113 | 114 | To disable Autoprefixer just remove postprocessor: 115 | 116 | ```ruby 117 | AutoprefixerRails.uninstall(Rails.application.assets) 118 | ``` 119 | 120 | [Browserslist docs]: https://github.com/ai/browserslist 121 | [Firefox ESR]: http://www.mozilla.org/en/firefox/organizations/faq/ 122 | 123 | ### Sprockets 124 | 125 | If you use Sinatra or another non-Rails framework with Sprockets, 126 | just connect your Sprockets environment with Autoprefixer and write CSS 127 | in the usual way: 128 | 129 | ```ruby 130 | assets = Sprockets::Environment.new do |env| 131 | # Your assets settings 132 | end 133 | 134 | require "autoprefixer-rails" 135 | AutoprefixerRails.install(assets) 136 | ``` 137 | 138 | ### Ruby 139 | 140 | If you need to call Autoprefixer from plain Ruby code, it’s very easy: 141 | 142 | ```ruby 143 | require "autoprefixer-rails" 144 | prefixed = AutoprefixerRails.process(css, from: 'main.css').css 145 | ``` 146 | 147 | ### Compass 148 | 149 | You should consider using Gulp instead of Compass binary, 150 | because it has better Autoprefixer integration and many other awesome plugins. 151 | 152 | But if you can’t move from Compass binary right now, there’s a hack 153 | to run Autoprefixer after `compass compile`. 154 | 155 | Install `autoprefixer-rails` gem: 156 | 157 | ``` 158 | gem install autoprefixer-rails 159 | ``` 160 | 161 | and add post-compile hook to `config.rb`: 162 | 163 | ```ruby 164 | require 'autoprefixer-rails' 165 | 166 | on_stylesheet_saved do |file| 167 | css = File.read(file) 168 | map = file + '.map' 169 | 170 | if File.exists? map 171 | result = AutoprefixerRails.process(css, 172 | from: file, 173 | to: file, 174 | map: { prev: File.read(map), inline: false }) 175 | File.open(file, 'w') { |io| io << result.css } 176 | File.open(map, 'w') { |io| io << result.map } 177 | else 178 | File.open(file, 'w') { |io| io << AutoprefixerRails.process(css) } 179 | end 180 | end 181 | ``` 182 | 183 | ## Visual Cascade 184 | 185 | By default, Autoprefixer will change CSS indentation to create nice visual 186 | cascade of prefixes. 187 | 188 | ```css 189 | a { 190 | -webkit-box-sizing: border-box; 191 | -moz-box-sizing: border-box; 192 | box-sizing: border-box 193 | } 194 | ``` 195 | 196 | You can disable this by specifying `cascade: false` in `config/autoprefixer.yml` 197 | or in `process()` options. 198 | 199 | ## Source Map 200 | 201 | Autoprefixer will generate a source map if you set `map` option to `true` in 202 | `process` method. 203 | 204 | You must set input and output CSS files paths (by `from` and `to` options) 205 | to generate a correct map. 206 | 207 | ```ruby 208 | result = AutoprefixerRails.process(css, 209 | map: true, 210 | from: 'main.css', 211 | to: 'main.out.css') 212 | ``` 213 | 214 | Autoprefixer can also modify previous source map (for example, from Sass 215 | compilation). Just set original source map content (as string) as `prev` 216 | in the `map` option. 217 | 218 | ```ruby 219 | result = AutoprefixerRails.process(css, { 220 | map: { prev: File.read('main.sass.css.map') }, 221 | from: 'main.sass.css', 222 | to: 'main.min.css') 223 | 224 | result.map #=> Source map from main.sass to main.min.css 225 | ``` 226 | 227 | See all options in [PostCSS docs]. AutoprefixerRails will convert Ruby style 228 | to JS style, so you can use `map: { sources_content: false }` 229 | instead of camelcase `sourcesContent`. 230 | 231 | [PostCSS docs]: https://github.com/postcss/postcss#source-map-1 232 | 233 | 234 | ## Security Contact 235 | 236 | To report a security vulnerability, please use the [Tidelift security contact]. 237 | Tidelift will coordinate the fix and disclosure. 238 | 239 | [Tidelift security contact]: https://tidelift.com/security 240 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "rubygems" 4 | 5 | require "bundler/setup" 6 | Bundler::GemHelper.install_tasks 7 | 8 | require "standard/rake" 9 | 10 | require "rspec/core/rake_task" 11 | RSpec::Core::RakeTask.new 12 | task default: [:spec, "standard:fix"] 13 | 14 | task :clobber_package do 15 | begin 16 | rm_r "pkg" 17 | rescue StandardError 18 | nil 19 | end 20 | end 21 | 22 | desc "Delete all generated files" 23 | task clobber: [:clobber_package] 24 | -------------------------------------------------------------------------------- /autoprefixer-rails.gemspec: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require File.expand_path("lib/autoprefixer-rails/version", __dir__) 4 | 5 | Gem::Specification.new do |s| 6 | s.platform = Gem::Platform::RUBY 7 | s.name = "autoprefixer-rails" 8 | s.version = AutoprefixerRails::VERSION.dup 9 | s.date = Time.now.strftime("%Y-%m-%d") 10 | s.summary = "Parse CSS and add vendor prefixes to CSS rules using " \ 11 | "values from the Can I Use website." 12 | 13 | s.files = Dir["{lib,vendor}/**/*", "LICENSE", "CHANGELOG.md", "README.md"] 14 | s.extra_rdoc_files = ["README.md", "LICENSE", "CHANGELOG.md"] 15 | s.require_path = "lib" 16 | s.required_ruby_version = ">= 2.4" 17 | 18 | s.author = "Andrey Sitnik" 19 | s.email = "andrey@sitnik.ru" 20 | s.homepage = "https://github.com/ai/autoprefixer-rails" 21 | s.license = "MIT" 22 | 23 | s.add_dependency "execjs", "~> 2" 24 | 25 | s.add_development_dependency "rails" 26 | s.add_development_dependency "rake" 27 | s.add_development_dependency "rspec-rails" 28 | s.add_development_dependency "rubocop", "~> 0.85.1" 29 | s.add_development_dependency "rubocop-packaging", "~> 0.1.1" 30 | s.add_development_dependency "standard" 31 | 32 | s.metadata["changelog_uri"] = "https://github.com/ai/autoprefixer-rails/blob/master/CHANGELOG.md" 33 | s.metadata["source_code_uri"] = "https://github.com/ai/autoprefixer-rails" 34 | s.metadata["bug_tracker_uri"] = "https://github.com/ai/autoprefixer-rails/issues" 35 | s.metadata["funding_uri"] = "https://tidelift.com/subscription/pkg/rubygems-autoprefixer-rails" 36 | end 37 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir -p pkg/ 4 | sudo podman build . --tag ai/autoprefixer-rails 5 | sudo podman run --privileged --rm -v ./pkg/:/var/app/pkg/ ai/autoprefixer-rails:latest -------------------------------------------------------------------------------- /build/autoprefixer.js: -------------------------------------------------------------------------------- 1 | import postcss from 'postcss' 2 | import autoprefixer from 'autoprefixer' 3 | 4 | export default { 5 | process: (css, processOptions, pluginOptions) => { 6 | // execjs does not support passing callback from ruby, 7 | // which makes waiting for the promise to settle from async function impossible 8 | var result = postcss([autoprefixer(pluginOptions)]).process(css, processOptions) 9 | 10 | var warns = result.warnings().map(function (i) { 11 | delete i.plugin 12 | return i.toString() 13 | }) 14 | 15 | var map = result.map ? result.map.toString() : null 16 | return { css: result.css, map: map, warnings: warns } 17 | }, 18 | 19 | info: (options) => { 20 | return autoprefixer(options).info() 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /build/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "build", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "browser": true, 7 | "dependencies": { 8 | "autoprefixer": "^10.4.21", 9 | "nop": "^1.0.0", 10 | "postcss": "^8.2.4", 11 | "text-encoding": "^0.7.0", 12 | "whatwg-url": "^9.0.0" 13 | }, 14 | "devDependencies": { 15 | "@rollup/plugin-alias": "^3.1.1", 16 | "@rollup/plugin-commonjs": "^17.0.0", 17 | "@rollup/plugin-inject": "^4.0.2", 18 | "@rollup/plugin-json": "^4.1.0", 19 | "@rollup/plugin-node-resolve": "^13.0.0", 20 | "@rollup/plugin-replace": "^2.3.3", 21 | "rollup": "^2.42.0", 22 | "rollup-plugin-node-polyfills": "^0.2.1" 23 | }, 24 | "scripts": { 25 | "build": "yarn run rollup -c rollup.config.js" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /build/rollup.config.js: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import alias from '@rollup/plugin-alias' 3 | import nodeResolve from '@rollup/plugin-node-resolve' 4 | import commonjs from '@rollup/plugin-commonjs' 5 | import json from '@rollup/plugin-json' 6 | import nodePolyfills from 'rollup-plugin-node-polyfills' 7 | import replace from '@rollup/plugin-replace' 8 | import inject from '@rollup/plugin-inject' 9 | 10 | export default { 11 | input: 'autoprefixer.js', 12 | output: { 13 | file: '../vendor/autoprefixer.js', 14 | format: 'iife', 15 | name: 'autoprefixer', 16 | sourcemap: 'inline' 17 | }, 18 | plugins: [ 19 | // patches for browser build 20 | replace({ 21 | "colorette.enabled": "null", 22 | "existsSync(": "void(", 23 | include: ["node_modules/postcss/lib/css-syntax-error.js", "node_modules/postcss/lib/previous-map.js"], 24 | delimiters: ['', ''] 25 | }), 26 | json(), 27 | alias({ 28 | entries: [ 29 | { find: '@babel/register', replacement: 'nop' }, 30 | { find: '@babel/core', replacement: 'nop' }, 31 | { find: 'url', replacement: path.resolve(__dirname, 'url.js') } 32 | ] 33 | }), 34 | commonjs({ 35 | transformMixedEsModules: true 36 | }), 37 | nodeResolve({ 38 | browser: true, 39 | preferBuiltins: false, 40 | extensions: [".mjs", ".js", ".json", ".node", ".es6"] 41 | }), 42 | nodePolyfills(), 43 | inject({ 44 | URL: ['whatwg-url', 'URL'], 45 | TextEncoder: ['text-encoding', 'TextEncoder'], 46 | TextDecoder: ['text-encoding', 'TextDecoder'] 47 | }) 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /build/url.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.assign( 2 | {}, 3 | require("rollup-plugin-node-polyfills/polyfills/url.js"), 4 | { 5 | pathToFileURL: (path)=> { return `file:///${encodeURIComponent(path)}` }, 6 | fileURLToPath: (fileURL)=> { return decodeURIComponent(fileURL.toString().replace(/^file:\/\/\//, '')) } 7 | } 8 | ) 9 | -------------------------------------------------------------------------------- /build/yarn-error.log: -------------------------------------------------------------------------------- 1 | Arguments: 2 | /home/albb0920/.fnm/node-versions/v16.4.2/installation/bin/node /usr/bin/yarn install 3 | 4 | PATH: 5 | /tmp/fnm_multishells/20519_1627958874204/bin:/home/albb0920/.fnm:/home/albb0920/.rbenv/shims:/home/albb0920/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 6 | 7 | Yarn version: 8 | 1.22.5 9 | 10 | Node version: 11 | 16.4.2 12 | 13 | Platform: 14 | linux x64 15 | 16 | Trace: 17 | SyntaxError: /home/albb0920/code/autoprefixer-rails/build/package.json: Unexpected token in JSON at position 151 18 | at JSON.parse () 19 | at /usr/lib/node_modules/yarn/lib/cli.js:1625:59 20 | at Generator.next () 21 | at step (/usr/lib/node_modules/yarn/lib/cli.js:310:30) 22 | at /usr/lib/node_modules/yarn/lib/cli.js:321:13 23 | 24 | npm manifest: 25 | { 26 | "name": "build", 27 | "version": "1.0.0", 28 | "main": "index.js", 29 | "license": "MIT", 30 | "browser": true, 31 | "dependencies": { 32 | "autoprefixer": "^10.3. 1", 33 | "nop": "^1.0.0", 34 | "postcss": "^8.2.4", 35 | "text-encoding": "^0.7.0", 36 | "whatwg-url": "^9.0.0" 37 | }, 38 | "devDependencies": { 39 | "@rollup/plugin-alias": "^3.1.1", 40 | "@rollup/plugin-commonjs": "^17.0.0", 41 | "@rollup/plugin-inject": "^4.0.2", 42 | "@rollup/plugin-json": "^4.1.0", 43 | "@rollup/plugin-node-resolve": "^11.0.1", 44 | "@rollup/plugin-replace": "^2.3.3", 45 | "rollup": "^2.27.0", 46 | "rollup-plugin-node-polyfills": "^0.2.1" 47 | }, 48 | "scripts": { 49 | "build": "yarn run rollup -c rollup.config.js" 50 | } 51 | } 52 | 53 | yarn manifest: 54 | No manifest 55 | 56 | Lockfile: 57 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 58 | # yarn lockfile v1 59 | 60 | 61 | "@rollup/plugin-alias@^3.1.1": 62 | version "3.1.1" 63 | resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.1.tgz#bb96cf37fefeb0a953a6566c284855c7d1cd290c" 64 | integrity sha512-hNcQY4bpBUIvxekd26DBPgF7BT4mKVNDF5tBG4Zi+3IgwLxGYRY0itHs9D0oLVwXM5pvJDWJlBQro+au8WaUWw== 65 | dependencies: 66 | slash "^3.0.0" 67 | 68 | "@rollup/plugin-commonjs@^17.0.0": 69 | version "17.0.0" 70 | resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-17.0.0.tgz#2ae2228354cf0fbba6cf9f06f30b2c66a974324c" 71 | integrity sha512-/omBIJG1nHQc+bgkYDuLpb/V08QyutP9amOrJRUSlYJZP+b/68gM//D8sxJe3Yry2QnYIr3QjR3x4AlxJEN3GA== 72 | dependencies: 73 | "@rollup/pluginutils" "^3.1.0" 74 | commondir "^1.0.1" 75 | estree-walker "^2.0.1" 76 | glob "^7.1.6" 77 | is-reference "^1.2.1" 78 | magic-string "^0.25.7" 79 | resolve "^1.17.0" 80 | 81 | "@rollup/plugin-inject@^4.0.2": 82 | version "4.0.2" 83 | resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-4.0.2.tgz#55b21bb244a07675f7fdde577db929c82fc17395" 84 | integrity sha512-TSLMA8waJ7Dmgmoc8JfPnwUwVZgLjjIAM6MqeIFqPO2ODK36JqE0Cf2F54UTgCUuW8da93Mvoj75a6KAVWgylw== 85 | dependencies: 86 | "@rollup/pluginutils" "^3.0.4" 87 | estree-walker "^1.0.1" 88 | magic-string "^0.25.5" 89 | 90 | "@rollup/plugin-json@^4.1.0": 91 | version "4.1.0" 92 | resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3" 93 | integrity sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== 94 | dependencies: 95 | "@rollup/pluginutils" "^3.0.8" 96 | 97 | "@rollup/plugin-node-resolve@^11.0.1": 98 | version "11.0.1" 99 | resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.0.1.tgz#d3765eec4bccf960801439a999382aed2dca959b" 100 | integrity sha512-ltlsj/4Bhwwhb+Nb5xCz/6vieuEj2/BAkkqVIKmZwC7pIdl8srmgmglE4S0jFlZa32K4qvdQ6NHdmpRKD/LwoQ== 101 | dependencies: 102 | "@rollup/pluginutils" "^3.1.0" 103 | "@types/resolve" "1.17.1" 104 | builtin-modules "^3.1.0" 105 | deepmerge "^4.2.2" 106 | is-module "^1.0.0" 107 | resolve "^1.19.0" 108 | 109 | "@rollup/plugin-replace@^2.3.3": 110 | version "2.3.4" 111 | resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.3.4.tgz#7dd84c17755d62b509577f2db37eb524d7ca88ca" 112 | integrity sha512-waBhMzyAtjCL1GwZes2jaE9MjuQ/DQF2BatH3fRivUF3z0JBFrU0U6iBNC/4WR+2rLKhaAhPWDNPYp4mI6RqdQ== 113 | dependencies: 114 | "@rollup/pluginutils" "^3.1.0" 115 | magic-string "^0.25.7" 116 | 117 | "@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": 118 | version "3.1.0" 119 | resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" 120 | integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== 121 | dependencies: 122 | "@types/estree" "0.0.39" 123 | estree-walker "^1.0.1" 124 | picomatch "^2.2.2" 125 | 126 | "@types/estree@*": 127 | version "0.0.45" 128 | resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884" 129 | integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== 130 | 131 | "@types/estree@0.0.39": 132 | version "0.0.39" 133 | resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" 134 | integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== 135 | 136 | "@types/node@*": 137 | version "14.14.16" 138 | resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.16.tgz#3cc351f8d48101deadfed4c9e4f116048d437b4b" 139 | integrity sha512-naXYePhweTi+BMv11TgioE2/FXU4fSl29HAH1ffxVciNsH3rYXjNP2yM8wqmSm7jS20gM8TIklKiTen+1iVncw== 140 | 141 | "@types/resolve@1.17.1": 142 | version "1.17.1" 143 | resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" 144 | integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== 145 | dependencies: 146 | "@types/node" "*" 147 | 148 | autoprefixer@^10.2.4: 149 | version "10.3.1" 150 | resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.3.1.tgz#954214821d3aa06692406c6a0a9e9d401eafbed2" 151 | integrity sha512-L8AmtKzdiRyYg7BUXJTzigmhbQRCXFKz6SA1Lqo0+AR2FBbQ4aTAPFSDlOutnFkjhiz8my4agGXog1xlMjPJ6A== 152 | dependencies: 153 | browserslist "^4.16.6" 154 | caniuse-lite "^1.0.30001243" 155 | colorette "^1.2.2" 156 | fraction.js "^4.1.1" 157 | normalize-range "^0.1.2" 158 | postcss-value-parser "^4.1.0" 159 | 160 | balanced-match@^1.0.0: 161 | version "1.0.0" 162 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 163 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 164 | 165 | brace-expansion@^1.1.7: 166 | version "1.1.11" 167 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 168 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 169 | dependencies: 170 | balanced-match "^1.0.0" 171 | concat-map "0.0.1" 172 | 173 | browserslist@^4.16.6: 174 | version "4.16.6" 175 | resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" 176 | integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== 177 | dependencies: 178 | caniuse-lite "^1.0.30001219" 179 | colorette "^1.2.2" 180 | electron-to-chromium "^1.3.723" 181 | escalade "^3.1.1" 182 | node-releases "^1.1.71" 183 | 184 | builtin-modules@^3.1.0: 185 | version "3.2.0" 186 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" 187 | integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== 188 | 189 | caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001243: 190 | version "1.0.30001248" 191 | resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001248.tgz#26ab45e340f155ea5da2920dadb76a533cb8ebce" 192 | integrity sha512-NwlQbJkxUFJ8nMErnGtT0QTM2TJ33xgz4KXJSMIrjXIbDVdaYueGyjOrLKRtJC+rTiWfi6j5cnZN1NBiSBJGNw== 193 | 194 | colorette@^1.2.1, colorette@^1.2.2: 195 | version "1.2.2" 196 | resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" 197 | integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== 198 | 199 | commondir@^1.0.1: 200 | version "1.0.1" 201 | resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" 202 | integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= 203 | 204 | concat-map@0.0.1: 205 | version "0.0.1" 206 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 207 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 208 | 209 | deepmerge@^4.2.2: 210 | version "4.2.2" 211 | resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" 212 | integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== 213 | 214 | electron-to-chromium@^1.3.723: 215 | version "1.3.793" 216 | resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.793.tgz#c10dff5f3126238004de344db458f1da3641d554" 217 | integrity sha512-l9NrGV6Mr4ov5mayYPvIWcwklNw5ROmy6rllzz9dCACw9nKE5y+s5uQk+CBJMetxrWZ6QJFsvEfG6WDcH2IGUg== 218 | 219 | escalade@^3.1.1: 220 | version "3.1.1" 221 | resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" 222 | integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== 223 | 224 | estree-walker@^0.6.1: 225 | version "0.6.1" 226 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" 227 | integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== 228 | 229 | estree-walker@^1.0.1: 230 | version "1.0.1" 231 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" 232 | integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== 233 | 234 | estree-walker@^2.0.1: 235 | version "2.0.2" 236 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" 237 | integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== 238 | 239 | fraction.js@^4.1.1: 240 | version "4.1.1" 241 | resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.1.1.tgz#ac4e520473dae67012d618aab91eda09bcb400ff" 242 | integrity sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg== 243 | 244 | fs.realpath@^1.0.0: 245 | version "1.0.0" 246 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 247 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 248 | 249 | fsevents@~2.1.2: 250 | version "2.1.3" 251 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" 252 | integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== 253 | 254 | function-bind@^1.1.1: 255 | version "1.1.1" 256 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" 257 | integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== 258 | 259 | glob@^7.1.6: 260 | version "7.1.6" 261 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" 262 | integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== 263 | dependencies: 264 | fs.realpath "^1.0.0" 265 | inflight "^1.0.4" 266 | inherits "2" 267 | minimatch "^3.0.4" 268 | once "^1.3.0" 269 | path-is-absolute "^1.0.0" 270 | 271 | has@^1.0.3: 272 | version "1.0.3" 273 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" 274 | integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== 275 | dependencies: 276 | function-bind "^1.1.1" 277 | 278 | inflight@^1.0.4: 279 | version "1.0.6" 280 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 281 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 282 | dependencies: 283 | once "^1.3.0" 284 | wrappy "1" 285 | 286 | inherits@2: 287 | version "2.0.4" 288 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 289 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 290 | 291 | is-core-module@^2.1.0: 292 | version "2.2.0" 293 | resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" 294 | integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== 295 | dependencies: 296 | has "^1.0.3" 297 | 298 | is-module@^1.0.0: 299 | version "1.0.0" 300 | resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" 301 | integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= 302 | 303 | is-reference@^1.2.1: 304 | version "1.2.1" 305 | resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" 306 | integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== 307 | dependencies: 308 | "@types/estree" "*" 309 | 310 | magic-string@^0.25.3, magic-string@^0.25.5, magic-string@^0.25.7: 311 | version "0.25.7" 312 | resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" 313 | integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== 314 | dependencies: 315 | sourcemap-codec "^1.4.4" 316 | 317 | minimatch@^3.0.4: 318 | version "3.0.4" 319 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 320 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 321 | dependencies: 322 | brace-expansion "^1.1.7" 323 | 324 | nanoid@^3.1.20: 325 | version "3.1.20" 326 | resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" 327 | integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== 328 | 329 | node-releases@^1.1.71: 330 | version "1.1.73" 331 | resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20" 332 | integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg== 333 | 334 | nop@^1.0.0: 335 | version "1.0.0" 336 | resolved "https://registry.yarnpkg.com/nop/-/nop-1.0.0.tgz#cb46cf7e01574aa6390858149f66897afe53c9ca" 337 | integrity sha1-y0bPfgFXSqY5CFgUn2aJev5Tyco= 338 | 339 | normalize-range@^0.1.2: 340 | version "0.1.2" 341 | resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" 342 | integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= 343 | 344 | once@^1.3.0: 345 | version "1.4.0" 346 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 347 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 348 | dependencies: 349 | wrappy "1" 350 | 351 | path-is-absolute@^1.0.0: 352 | version "1.0.1" 353 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 354 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 355 | 356 | path-parse@^1.0.6: 357 | version "1.0.6" 358 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 359 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 360 | 361 | picomatch@^2.2.2: 362 | version "2.2.2" 363 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" 364 | integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== 365 | 366 | postcss-value-parser@^4.1.0: 367 | version "4.1.0" 368 | resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" 369 | integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== 370 | 371 | postcss@^8.2.4: 372 | version "8.2.4" 373 | resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.4.tgz#20a98a39cf303d15129c2865a9ec37eda0031d04" 374 | integrity sha512-kRFftRoExRVXZlwUuay9iC824qmXPcQQVzAjbCCgjpXnkdMCJYBu2gTwAaFBzv8ewND6O8xFb3aELmEkh9zTzg== 375 | dependencies: 376 | colorette "^1.2.1" 377 | nanoid "^3.1.20" 378 | source-map "^0.6.1" 379 | 380 | punycode@^2.1.1: 381 | version "2.1.1" 382 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" 383 | integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== 384 | 385 | resolve@^1.17.0, resolve@^1.19.0: 386 | version "1.19.0" 387 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" 388 | integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== 389 | dependencies: 390 | is-core-module "^2.1.0" 391 | path-parse "^1.0.6" 392 | 393 | rollup-plugin-inject@^3.0.0: 394 | version "3.0.2" 395 | resolved "https://registry.yarnpkg.com/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz#e4233855bfba6c0c12a312fd6649dff9a13ee9f4" 396 | integrity sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w== 397 | dependencies: 398 | estree-walker "^0.6.1" 399 | magic-string "^0.25.3" 400 | rollup-pluginutils "^2.8.1" 401 | 402 | rollup-plugin-node-polyfills@^0.2.1: 403 | version "0.2.1" 404 | resolved "https://registry.yarnpkg.com/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz#53092a2744837164d5b8a28812ba5f3ff61109fd" 405 | integrity sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA== 406 | dependencies: 407 | rollup-plugin-inject "^3.0.0" 408 | 409 | rollup-pluginutils@^2.8.1: 410 | version "2.8.2" 411 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" 412 | integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== 413 | dependencies: 414 | estree-walker "^0.6.1" 415 | 416 | rollup@^2.27.0: 417 | version "2.35.1" 418 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.35.1.tgz#e6bc8d10893556a638066f89e8c97f422d03968c" 419 | integrity sha512-q5KxEyWpprAIcainhVy6HfRttD9kutQpHbeqDTWnqAFNJotiojetK6uqmcydNMymBEtC4I8bCYR+J3mTMqeaUA== 420 | optionalDependencies: 421 | fsevents "~2.1.2" 422 | 423 | slash@^3.0.0: 424 | version "3.0.0" 425 | resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" 426 | integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== 427 | 428 | source-map@^0.6.1: 429 | version "0.6.1" 430 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 431 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 432 | 433 | sourcemap-codec@^1.4.4: 434 | version "1.4.8" 435 | resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" 436 | integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== 437 | 438 | text-encoding@^0.7.0: 439 | version "0.7.0" 440 | resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.7.0.tgz#f895e836e45990624086601798ea98e8f36ee643" 441 | integrity sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA== 442 | 443 | tr46@^2.1.0: 444 | version "2.1.0" 445 | resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" 446 | integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== 447 | dependencies: 448 | punycode "^2.1.1" 449 | 450 | webidl-conversions@^6.1.0: 451 | version "6.1.0" 452 | resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" 453 | integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== 454 | 455 | whatwg-url@^9.0.0: 456 | version "9.0.0" 457 | resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-9.0.0.tgz#7de99809eaaba2bff7e0a995a516b26aa789fb89" 458 | integrity sha512-KGnRJgaFqeUnHQH/3KbcBh8VB6nKCodfzmBih0lizk+FlETQ+IYti4WbV2GL5D5A0++79nizlMwNaQCtxmwL7w== 459 | dependencies: 460 | tr46 "^2.1.0" 461 | webidl-conversions "^6.1.0" 462 | 463 | wrappy@1: 464 | version "1.0.2" 465 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 466 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 467 | -------------------------------------------------------------------------------- /build/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@rollup/plugin-alias@^3.1.1": 6 | version "3.1.1" 7 | resolved "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-3.1.1.tgz" 8 | integrity sha512-hNcQY4bpBUIvxekd26DBPgF7BT4mKVNDF5tBG4Zi+3IgwLxGYRY0itHs9D0oLVwXM5pvJDWJlBQro+au8WaUWw== 9 | dependencies: 10 | slash "^3.0.0" 11 | 12 | "@rollup/plugin-commonjs@^17.0.0": 13 | version "17.0.0" 14 | resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-17.0.0.tgz" 15 | integrity sha512-/omBIJG1nHQc+bgkYDuLpb/V08QyutP9amOrJRUSlYJZP+b/68gM//D8sxJe3Yry2QnYIr3QjR3x4AlxJEN3GA== 16 | dependencies: 17 | "@rollup/pluginutils" "^3.1.0" 18 | commondir "^1.0.1" 19 | estree-walker "^2.0.1" 20 | glob "^7.1.6" 21 | is-reference "^1.2.1" 22 | magic-string "^0.25.7" 23 | resolve "^1.17.0" 24 | 25 | "@rollup/plugin-inject@^4.0.2": 26 | version "4.0.2" 27 | resolved "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-4.0.2.tgz" 28 | integrity sha512-TSLMA8waJ7Dmgmoc8JfPnwUwVZgLjjIAM6MqeIFqPO2ODK36JqE0Cf2F54UTgCUuW8da93Mvoj75a6KAVWgylw== 29 | dependencies: 30 | "@rollup/pluginutils" "^3.0.4" 31 | estree-walker "^1.0.1" 32 | magic-string "^0.25.5" 33 | 34 | "@rollup/plugin-json@^4.1.0": 35 | version "4.1.0" 36 | resolved "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz" 37 | integrity sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== 38 | dependencies: 39 | "@rollup/pluginutils" "^3.0.8" 40 | 41 | "@rollup/plugin-node-resolve@^13.0.0": 42 | version "13.3.0" 43 | resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz" 44 | integrity sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw== 45 | dependencies: 46 | "@rollup/pluginutils" "^3.1.0" 47 | "@types/resolve" "1.17.1" 48 | deepmerge "^4.2.2" 49 | is-builtin-module "^3.1.0" 50 | is-module "^1.0.0" 51 | resolve "^1.19.0" 52 | 53 | "@rollup/plugin-replace@^2.3.3": 54 | version "2.3.4" 55 | resolved "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.3.4.tgz" 56 | integrity sha512-waBhMzyAtjCL1GwZes2jaE9MjuQ/DQF2BatH3fRivUF3z0JBFrU0U6iBNC/4WR+2rLKhaAhPWDNPYp4mI6RqdQ== 57 | dependencies: 58 | "@rollup/pluginutils" "^3.1.0" 59 | magic-string "^0.25.7" 60 | 61 | "@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": 62 | version "3.1.0" 63 | resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz" 64 | integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== 65 | dependencies: 66 | "@types/estree" "0.0.39" 67 | estree-walker "^1.0.1" 68 | picomatch "^2.2.2" 69 | 70 | "@types/estree@*": 71 | version "0.0.45" 72 | resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.45.tgz" 73 | integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== 74 | 75 | "@types/estree@0.0.39": 76 | version "0.0.39" 77 | resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz" 78 | integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== 79 | 80 | "@types/node@*": 81 | version "14.14.16" 82 | resolved "https://registry.npmjs.org/@types/node/-/node-14.14.16.tgz" 83 | integrity sha512-naXYePhweTi+BMv11TgioE2/FXU4fSl29HAH1ffxVciNsH3rYXjNP2yM8wqmSm7jS20gM8TIklKiTen+1iVncw== 84 | 85 | "@types/resolve@1.17.1": 86 | version "1.17.1" 87 | resolved "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz" 88 | integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== 89 | dependencies: 90 | "@types/node" "*" 91 | 92 | autoprefixer@^10.4.21: 93 | version "10.4.21" 94 | resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz" 95 | integrity sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ== 96 | dependencies: 97 | browserslist "^4.24.4" 98 | caniuse-lite "^1.0.30001702" 99 | fraction.js "^4.3.7" 100 | normalize-range "^0.1.2" 101 | picocolors "^1.1.1" 102 | postcss-value-parser "^4.2.0" 103 | 104 | balanced-match@^1.0.0: 105 | version "1.0.0" 106 | resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" 107 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 108 | 109 | brace-expansion@^1.1.7: 110 | version "1.1.11" 111 | resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" 112 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 113 | dependencies: 114 | balanced-match "^1.0.0" 115 | concat-map "0.0.1" 116 | 117 | browserslist@^4.24.4: 118 | version "4.24.4" 119 | resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz" 120 | integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== 121 | dependencies: 122 | caniuse-lite "^1.0.30001688" 123 | electron-to-chromium "^1.5.73" 124 | node-releases "^2.0.19" 125 | update-browserslist-db "^1.1.1" 126 | 127 | builtin-modules@^3.0.0: 128 | version "3.2.0" 129 | resolved "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz" 130 | integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== 131 | 132 | caniuse-lite@^1.0.30001688, caniuse-lite@^1.0.30001702: 133 | version "1.0.30001713" 134 | resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz" 135 | integrity sha512-wCIWIg+A4Xr7NfhTuHdX+/FKh3+Op3LBbSp2N5Pfx6T/LhdQy3GTyoTg48BReaW/MyMNZAkTadsBtai3ldWK0Q== 136 | 137 | colorette@^1.2.1: 138 | version "1.2.2" 139 | resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz" 140 | integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== 141 | 142 | commondir@^1.0.1: 143 | version "1.0.1" 144 | resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz" 145 | integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= 146 | 147 | concat-map@0.0.1: 148 | version "0.0.1" 149 | resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" 150 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 151 | 152 | deepmerge@^4.2.2: 153 | version "4.2.2" 154 | resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" 155 | integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== 156 | 157 | electron-to-chromium@^1.5.73: 158 | version "1.5.136" 159 | resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.136.tgz" 160 | integrity sha512-kL4+wUTD7RSA5FHx5YwWtjDnEEkIIikFgWHR4P6fqjw1PPLlqYkxeOb++wAauAssat0YClCy8Y3C5SxgSkjibQ== 161 | 162 | escalade@^3.2.0: 163 | version "3.2.0" 164 | resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" 165 | integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== 166 | 167 | estree-walker@^0.6.1: 168 | version "0.6.1" 169 | resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz" 170 | integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== 171 | 172 | estree-walker@^1.0.1: 173 | version "1.0.1" 174 | resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz" 175 | integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== 176 | 177 | estree-walker@^2.0.1: 178 | version "2.0.2" 179 | resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz" 180 | integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== 181 | 182 | fraction.js@^4.3.7: 183 | version "4.3.7" 184 | resolved "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz" 185 | integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== 186 | 187 | fs.realpath@^1.0.0: 188 | version "1.0.0" 189 | resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" 190 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 191 | 192 | fsevents@~2.3.2: 193 | version "2.3.3" 194 | resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" 195 | integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== 196 | 197 | function-bind@^1.1.1: 198 | version "1.1.1" 199 | resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" 200 | integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== 201 | 202 | glob@^7.1.6: 203 | version "7.1.6" 204 | resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz" 205 | integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== 206 | dependencies: 207 | fs.realpath "^1.0.0" 208 | inflight "^1.0.4" 209 | inherits "2" 210 | minimatch "^3.0.4" 211 | once "^1.3.0" 212 | path-is-absolute "^1.0.0" 213 | 214 | has@^1.0.3: 215 | version "1.0.3" 216 | resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" 217 | integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== 218 | dependencies: 219 | function-bind "^1.1.1" 220 | 221 | inflight@^1.0.4: 222 | version "1.0.6" 223 | resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" 224 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 225 | dependencies: 226 | once "^1.3.0" 227 | wrappy "1" 228 | 229 | inherits@2: 230 | version "2.0.4" 231 | resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" 232 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 233 | 234 | is-builtin-module@^3.1.0: 235 | version "3.1.0" 236 | resolved "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.1.0.tgz" 237 | integrity sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg== 238 | dependencies: 239 | builtin-modules "^3.0.0" 240 | 241 | is-core-module@^2.1.0: 242 | version "2.2.0" 243 | resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz" 244 | integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== 245 | dependencies: 246 | has "^1.0.3" 247 | 248 | is-module@^1.0.0: 249 | version "1.0.0" 250 | resolved "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz" 251 | integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= 252 | 253 | is-reference@^1.2.1: 254 | version "1.2.1" 255 | resolved "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz" 256 | integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== 257 | dependencies: 258 | "@types/estree" "*" 259 | 260 | magic-string@^0.25.3, magic-string@^0.25.5, magic-string@^0.25.7: 261 | version "0.25.7" 262 | resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz" 263 | integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== 264 | dependencies: 265 | sourcemap-codec "^1.4.4" 266 | 267 | minimatch@^3.0.4: 268 | version "3.0.4" 269 | resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" 270 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 271 | dependencies: 272 | brace-expansion "^1.1.7" 273 | 274 | nanoid@^3.1.20: 275 | version "3.3.11" 276 | resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b" 277 | integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== 278 | 279 | node-releases@^2.0.19: 280 | version "2.0.19" 281 | resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz" 282 | integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== 283 | 284 | nop@^1.0.0: 285 | version "1.0.0" 286 | resolved "https://registry.npmjs.org/nop/-/nop-1.0.0.tgz" 287 | integrity sha1-y0bPfgFXSqY5CFgUn2aJev5Tyco= 288 | 289 | normalize-range@^0.1.2: 290 | version "0.1.2" 291 | resolved "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz" 292 | integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== 293 | 294 | once@^1.3.0: 295 | version "1.4.0" 296 | resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" 297 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 298 | dependencies: 299 | wrappy "1" 300 | 301 | path-is-absolute@^1.0.0: 302 | version "1.0.1" 303 | resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" 304 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 305 | 306 | path-parse@^1.0.6: 307 | version "1.0.6" 308 | resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz" 309 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 310 | 311 | picocolors@^1.1.1: 312 | version "1.1.1" 313 | resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" 314 | integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== 315 | 316 | picomatch@^2.2.2: 317 | version "2.2.2" 318 | resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz" 319 | integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== 320 | 321 | postcss-value-parser@^4.2.0: 322 | version "4.2.0" 323 | resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" 324 | integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== 325 | 326 | postcss@^8.2.4: 327 | version "8.2.4" 328 | resolved "https://registry.npmjs.org/postcss/-/postcss-8.2.4.tgz" 329 | integrity sha512-kRFftRoExRVXZlwUuay9iC824qmXPcQQVzAjbCCgjpXnkdMCJYBu2gTwAaFBzv8ewND6O8xFb3aELmEkh9zTzg== 330 | dependencies: 331 | colorette "^1.2.1" 332 | nanoid "^3.1.20" 333 | source-map "^0.6.1" 334 | 335 | punycode@^2.1.1: 336 | version "2.1.1" 337 | resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" 338 | integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== 339 | 340 | resolve@^1.17.0, resolve@^1.19.0: 341 | version "1.19.0" 342 | resolved "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz" 343 | integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== 344 | dependencies: 345 | is-core-module "^2.1.0" 346 | path-parse "^1.0.6" 347 | 348 | rollup-plugin-inject@^3.0.0: 349 | version "3.0.2" 350 | resolved "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz" 351 | integrity sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w== 352 | dependencies: 353 | estree-walker "^0.6.1" 354 | magic-string "^0.25.3" 355 | rollup-pluginutils "^2.8.1" 356 | 357 | rollup-plugin-node-polyfills@^0.2.1: 358 | version "0.2.1" 359 | resolved "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz" 360 | integrity sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA== 361 | dependencies: 362 | rollup-plugin-inject "^3.0.0" 363 | 364 | rollup-pluginutils@^2.8.1: 365 | version "2.8.2" 366 | resolved "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz" 367 | integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== 368 | dependencies: 369 | estree-walker "^0.6.1" 370 | 371 | rollup@^2.42.0: 372 | version "2.79.2" 373 | resolved "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz" 374 | integrity sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ== 375 | optionalDependencies: 376 | fsevents "~2.3.2" 377 | 378 | slash@^3.0.0: 379 | version "3.0.0" 380 | resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" 381 | integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== 382 | 383 | source-map@^0.6.1: 384 | version "0.6.1" 385 | resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" 386 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 387 | 388 | sourcemap-codec@^1.4.4: 389 | version "1.4.8" 390 | resolved "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz" 391 | integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== 392 | 393 | text-encoding@^0.7.0: 394 | version "0.7.0" 395 | resolved "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz" 396 | integrity sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA== 397 | 398 | tr46@^2.1.0: 399 | version "2.1.0" 400 | resolved "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz" 401 | integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== 402 | dependencies: 403 | punycode "^2.1.1" 404 | 405 | update-browserslist-db@^1.1.1: 406 | version "1.1.3" 407 | resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz" 408 | integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw== 409 | dependencies: 410 | escalade "^3.2.0" 411 | picocolors "^1.1.1" 412 | 413 | webidl-conversions@^6.1.0: 414 | version "6.1.0" 415 | resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz" 416 | integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== 417 | 418 | whatwg-url@^9.0.0: 419 | version "9.0.0" 420 | resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.0.0.tgz" 421 | integrity sha512-KGnRJgaFqeUnHQH/3KbcBh8VB6nKCodfzmBih0lizk+FlETQ+IYti4WbV2GL5D5A0++79nizlMwNaQCtxmwL7w== 422 | dependencies: 423 | tr46 "^2.1.0" 424 | webidl-conversions "^6.1.0" 425 | 426 | wrappy@1: 427 | version "1.0.2" 428 | resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" 429 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 430 | -------------------------------------------------------------------------------- /lib/autoprefixer-rails.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Ruby integration with Autoprefixer JS library, which parse CSS and adds 4 | # only actual prefixed 5 | module AutoprefixerRails 6 | autoload :Sprockets, "autoprefixer-rails/sprockets" 7 | 8 | # Add prefixes to `css`. See `Processor#process` for options. 9 | def self.process(css, opts = {}) 10 | params = {} 11 | params[:overrideBrowserslist] = opts.delete(:overrideBrowserslist) if opts.key?(:overrideBrowserslist) 12 | params[:browsers] = opts.delete(:browsers) if opts.key?(:browsers) 13 | params[:cascade] = opts.delete(:cascade) if opts.key?(:cascade) 14 | params[:remove] = opts.delete(:remove) if opts.key?(:remove) 15 | params[:env] = opts.delete(:env) if opts.key?(:env) 16 | processor(params).process(css, opts) 17 | end 18 | 19 | # Add Autoprefixer for Sprockets environment in `assets`. 20 | # You can specify `browsers` actual in your project. 21 | def self.install(assets, params = {}) 22 | Sprockets.register_processor(processor(params)) 23 | Sprockets.install(assets) 24 | end 25 | 26 | # Disable installed Autoprefixer 27 | def self.uninstall(assets) 28 | Sprockets.uninstall(assets) 29 | end 30 | 31 | # Cache processor instances 32 | def self.processor(params = {}) 33 | Processor.new(params) 34 | end 35 | end 36 | 37 | require_relative "autoprefixer-rails/result" 38 | require_relative "autoprefixer-rails/version" 39 | require_relative "autoprefixer-rails/processor" 40 | 41 | require_relative "autoprefixer-rails/railtie" if defined?(Rails) 42 | -------------------------------------------------------------------------------- /lib/autoprefixer-rails/processor.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "pathname" 4 | require "execjs" 5 | require "json" 6 | 7 | module AutoprefixerRails 8 | IS_SECTION = /^\s*\[(.+)\]\s*$/.freeze 9 | 10 | # Ruby to JS wrapper for Autoprefixer processor instance 11 | class Processor 12 | SUPPORTED_RUNTIMES = [ExecJS::Runtimes::Node, ExecJS::Runtimes::MiniRacer] 13 | 14 | def initialize(params = {}) 15 | @params = params || {} 16 | end 17 | 18 | # Process `css` and return result. 19 | # 20 | # Options can be: 21 | # * `from` with input CSS file name. Will be used in error messages. 22 | # * `to` with output CSS file name. 23 | # * `map` with true to generate new source map or with previous map. 24 | def process(css, opts = {}) 25 | opts = convert_options(opts) 26 | 27 | plugin_opts = params_with_browsers(opts[:from]).merge(opts) 28 | process_opts = { 29 | from: plugin_opts.delete(:from), 30 | to: plugin_opts.delete(:to), 31 | map: plugin_opts.delete(:map) 32 | } 33 | 34 | begin 35 | result = runtime.call("autoprefixer.process", css, process_opts, plugin_opts) 36 | rescue ExecJS::ProgramError => e 37 | contry_error = "BrowserslistError: " \ 38 | "Country statistics are not supported " \ 39 | "in client-side build of Browserslist" 40 | if e.message == contry_error 41 | raise "Country statistics is not supported in AutoprefixerRails. " \ 42 | "Use Autoprefixer with webpack or other Node.js builder." 43 | else 44 | raise e 45 | end 46 | end 47 | 48 | Result.new(result["css"], result["map"], result["warnings"]) 49 | end 50 | 51 | # Return, which browsers and prefixes will be used 52 | def info 53 | runtime.call("autoprefixer.info", params_with_browsers) 54 | end 55 | 56 | # Parse Browserslist config 57 | def parse_config(config) 58 | sections = { "defaults" => [] } 59 | current = "defaults" 60 | config.gsub(/#[^\n]*/, "") 61 | .split(/\n/) 62 | .map(&:strip) 63 | .reject(&:empty?) 64 | .each do |line| 65 | if IS_SECTION =~ line 66 | current = line.match(IS_SECTION)[1].strip 67 | sections[current] ||= [] 68 | else 69 | sections[current] << line 70 | end 71 | end 72 | sections 73 | end 74 | 75 | private 76 | 77 | def params_with_browsers(from = nil) 78 | from ||= if defined?(Rails) && Rails.respond_to?(:root) && Rails.root 79 | Rails.root.join("app/assets/stylesheets").to_s 80 | else 81 | "." 82 | end 83 | 84 | params = @params 85 | if !params.key?(:browsers) && !params.key?(:overrideBrowserslist) && from 86 | file = find_config(from) 87 | if file 88 | env = params[:env].to_s || "development" 89 | config = parse_config(file) 90 | params = params.dup 91 | params[:overrideBrowserslist] = (config[env] || config["defaults"]) 92 | end 93 | end 94 | 95 | params 96 | end 97 | 98 | # Convert ruby_options to jsOptions 99 | def convert_options(opts) 100 | converted = {} 101 | 102 | opts.each_pair do |name, value| 103 | if /_/ =~ name 104 | name = name.to_s.gsub(/_\w/) { |i| i.delete("_").upcase }.to_sym 105 | end 106 | value = convert_options(value) if value.is_a? Hash 107 | converted[name] = value 108 | end 109 | 110 | converted 111 | end 112 | 113 | # Try to find Browserslist config 114 | def find_config(file) 115 | path = Pathname(file).expand_path 116 | 117 | while path.parent != path 118 | config1 = path.join("browserslist") 119 | return config1.read if config1.exist? && !config1.directory? 120 | 121 | config2 = path.join(".browserslistrc") 122 | return config2.read if config2.exist? && !config1.directory? 123 | 124 | path = path.parent 125 | end 126 | 127 | nil 128 | end 129 | 130 | # Lazy load for JS library 131 | def runtime 132 | @runtime ||= begin 133 | ExecJS.compile(build_js) 134 | rescue ExecJS::RuntimeError 135 | # Only complain about unsupported runtimes when it failed to parse our script. 136 | 137 | case ExecJS.runtime 138 | when ExecJS::Runtimes::Node 139 | node_command = ExecJS.runtime.send(:binary) rescue "Unknown" 140 | 141 | raise <<~MSG 142 | Your nodejs binary failed to load autoprefixer script file, 143 | please check if you're running a supported version (10, 12, 14+) 144 | 145 | ENV["PATH"] = #{ENV["PATH"]} 146 | binary = #{node_command} 147 | MSG 148 | when *SUPPORTED_RUNTIMES 149 | raise 150 | else 151 | raise <<~MSG 152 | Your ExecJS runtime #{ExecJS.runtime.name} isn't supported by autoprefixer-rails, 153 | please switch to #{SUPPORTED_RUNTIMES.map(&:name).join(' or ')} 154 | MSG 155 | end 156 | end 157 | end 158 | 159 | def build_js 160 | root = Pathname(File.dirname(__FILE__)) 161 | path = root.join("../../vendor/autoprefixer.js") 162 | path.read 163 | end 164 | end 165 | end 166 | -------------------------------------------------------------------------------- /lib/autoprefixer-rails/railtie.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "yaml" 4 | begin 5 | require "sprockets/railtie" 6 | rescue LoadError 7 | end 8 | 9 | begin 10 | module AutoprefixedRails 11 | class Railtie < ::Rails::Railtie # :nodoc: 12 | rake_tasks do |app| 13 | require "rake/autoprefixer_tasks" 14 | Rake::AutoprefixerTasks.new(config) if defined? app.assets 15 | end 16 | 17 | if config.respond_to?(:assets) && !config.assets.nil? 18 | config.assets.configure do |env| 19 | AutoprefixerRails.install(env, config) 20 | end 21 | else 22 | initializer :setup_autoprefixer, group: :all do |app| 23 | AutoprefixerRails.install(app.assets, config) if defined?(app.assets) && !app.assets.nil? 24 | end 25 | end 26 | 27 | # Read browsers requirements from application or engine config 28 | def config 29 | params = {} 30 | 31 | roots.each do |root| 32 | file = File.join(root, "config/autoprefixer.yml") 33 | 34 | next unless File.exist?(file) 35 | 36 | parsed = ::YAML.load_file(file) 37 | next unless parsed 38 | 39 | params = parsed 40 | 41 | break 42 | end 43 | 44 | params = params.symbolize_keys 45 | params[:env] ||= Rails.env.to_s 46 | params 47 | end 48 | 49 | def roots 50 | [Rails.application.root] + Rails::Engine.subclasses.map(&:root) 51 | end 52 | end 53 | end 54 | rescue LoadError 55 | end 56 | -------------------------------------------------------------------------------- /lib/autoprefixer-rails/result.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module AutoprefixerRails 4 | # Container of prefixed CSS and source map with changes 5 | class Result 6 | # Prefixed CSS after Autoprefixer 7 | attr_reader :css 8 | 9 | # Source map of changes 10 | attr_reader :map 11 | 12 | # Warnings from Autoprefixer 13 | attr_reader :warnings 14 | 15 | def initialize(css, map, warnings) 16 | @warnings = warnings 17 | @css = css 18 | @map = map 19 | end 20 | 21 | # Stringify prefixed CSS 22 | def to_s 23 | @css 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /lib/autoprefixer-rails/sprockets.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "pathname" 4 | 5 | module AutoprefixerRails 6 | # Register autoprefixer postprocessor in Sprockets and fix common issues 7 | class Sprockets 8 | def self.register_processor(processor) 9 | @processor = processor 10 | end 11 | 12 | # Sprockets 3 and 4 API 13 | def self.call(input) 14 | filename = input[:filename] 15 | source = input[:data] 16 | run(filename, source) 17 | end 18 | 19 | # Add prefixes to `css` 20 | def self.run(filename, css) 21 | output = filename.chomp(File.extname(filename)) + ".css" 22 | result = @processor.process(css, from: filename, to: output) 23 | 24 | result.warnings.each do |warning| 25 | warn "autoprefixer: #{warning}" 26 | end 27 | 28 | result.css 29 | end 30 | 31 | # Register postprocessor in Sprockets depend on issues with other gems 32 | def self.install(env) 33 | if ::Sprockets::VERSION.to_f < 4 34 | env.register_postprocessor("text/css", 35 | ::AutoprefixerRails::Sprockets) 36 | else 37 | env.register_bundle_processor("text/css", 38 | ::AutoprefixerRails::Sprockets) 39 | end 40 | end 41 | 42 | # Register postprocessor in Sprockets depend on issues with other gems 43 | def self.uninstall(env) 44 | if ::Sprockets::VERSION.to_f < 4 45 | env.unregister_postprocessor("text/css", 46 | ::AutoprefixerRails::Sprockets) 47 | else 48 | env.unregister_bundle_processor("text/css", 49 | ::AutoprefixerRails::Sprockets) 50 | end 51 | end 52 | 53 | # Sprockets 2 API new and render 54 | def initialize(filename) 55 | @filename = filename 56 | @source = yield 57 | end 58 | 59 | # Sprockets 2 API new and render 60 | def render(*) 61 | self.class.run(@filename, @source) 62 | end 63 | end 64 | end 65 | -------------------------------------------------------------------------------- /lib/autoprefixer-rails/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module AutoprefixerRails # :nodoc: 4 | VERSION = "10.4.21.0" unless defined? AutoprefixerRails::VERSION 5 | end 6 | -------------------------------------------------------------------------------- /lib/rake/autoprefixer_tasks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "rake" 4 | require "rake/tasklib" 5 | require "autoprefixer-rails" 6 | 7 | module Rake 8 | # Define task to inspect Autoprefixer browsers, properties and values. 9 | # Call it from your `Rakefile`: 10 | # 11 | # AutoprefixerTasks.new(['> 1%', 'opera 12']) 12 | class AutoprefixerTasks < Rake::TaskLib 13 | attr_reader :browsers 14 | 15 | def initialize(params = {}) 16 | @params = params 17 | @processor = AutoprefixerRails.processor(@params) 18 | define 19 | end 20 | 21 | def define 22 | namespace :autoprefixer do 23 | desc "Show selected browsers and prefixed CSS properties and values" 24 | task :info do 25 | puts @processor.info 26 | end 27 | end 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /spec/app/.browserslistrc: -------------------------------------------------------------------------------- 1 | ie 11 2 | 3 | [test] 4 | chrome 25 5 | -------------------------------------------------------------------------------- /spec/app/.gitignore: -------------------------------------------------------------------------------- 1 | /log 2 | /tmp 3 | -------------------------------------------------------------------------------- /spec/app/Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require File.expand_path("config/application", __dir__) 4 | App::Application.load_tasks 5 | -------------------------------------------------------------------------------- /spec/app/app/assets/config/manifest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ai/autoprefixer-rails/01f8d15c4677be4a8707a99db11dc58154e16aef/spec/app/app/assets/config/manifest.js -------------------------------------------------------------------------------- /spec/app/app/assets/stylesheets/evaluate.css.erb: -------------------------------------------------------------------------------- 1 | <%= evaluate 'test.css' %> 2 | -------------------------------------------------------------------------------- /spec/app/app/assets/stylesheets/loaded.sass: -------------------------------------------------------------------------------- 1 | a 2 | mask: none 3 | -------------------------------------------------------------------------------- /spec/app/app/assets/stylesheets/sass.sass: -------------------------------------------------------------------------------- 1 | @import "loaded" 2 | -------------------------------------------------------------------------------- /spec/app/app/assets/stylesheets/test.css: -------------------------------------------------------------------------------- 1 | a { 2 | mask: none 3 | } 4 | -------------------------------------------------------------------------------- /spec/app/app/assets/stylesheets/wrong.css: -------------------------------------------------------------------------------- 1 | a { 2 | background: linear-gradient(top, white, black) 3 | -------------------------------------------------------------------------------- /spec/app/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ApplicationController < ActionController::Base 4 | end 5 | -------------------------------------------------------------------------------- /spec/app/app/controllers/css_controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CssController < ApplicationController 4 | def test 5 | file = params[:exact_file] || params[:file] + ".css" 6 | render plain: Rails.application.assets[file].to_s.gsub(/;(\s})/, '\1') 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/app/config.ru: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require ::File.expand_path("config/environment", __dir__) 4 | run App::Application 5 | -------------------------------------------------------------------------------- /spec/app/config/application.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require File.expand_path("boot", __dir__) 4 | 5 | require "action_controller/railtie" 6 | require "sprockets/railtie" 7 | 8 | Bundler.require(*Rails.groups(assets: %w[development test])) if defined?(Bundler) 9 | 10 | module App 11 | class Application < Rails::Application 12 | config.assets.enabled = true 13 | config.sass.line_comments = false 14 | config.sass.inline_source_maps = true 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /spec/app/config/autoprefixer.yml: -------------------------------------------------------------------------------- 1 | supports: false 2 | cascade: false 3 | -------------------------------------------------------------------------------- /spec/app/config/boot.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__) 4 | require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) 5 | -------------------------------------------------------------------------------- /spec/app/config/environment.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "tzinfo" 4 | require File.expand_path("application", __dir__) 5 | App::Application.initialize! 6 | -------------------------------------------------------------------------------- /spec/app/config/environments/test.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | App::Application.configure do 4 | config.cache_classes = true 5 | config.eager_load = false 6 | config.consider_all_requests_local = true 7 | config.action_controller.perform_caching = false 8 | config.action_dispatch.show_exceptions = false 9 | config.action_controller.allow_forgery_protection = false 10 | config.active_support.deprecation = :stderr 11 | end 12 | -------------------------------------------------------------------------------- /spec/app/config/initializers/secret_token.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | App::Application.config.secret_key_base = "test" 4 | -------------------------------------------------------------------------------- /spec/app/config/routes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | App::Application.routes.draw do 4 | root to: "css#test" 5 | end 6 | -------------------------------------------------------------------------------- /spec/autoprefixer_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative "spec_helper" 4 | 5 | describe AutoprefixerRails do 6 | before :all do 7 | @dir = Pathname(__FILE__).dirname 8 | @css = @dir.join("app/app/assets/stylesheets/test.css").read 9 | end 10 | 11 | it "process CSS" do 12 | expect(AutoprefixerRails.process(@css)).to be_a(AutoprefixerRails::Result) 13 | end 14 | 15 | it "process CSS for selected browsers" do 16 | css = "a {\n tab-size: 2\n}" 17 | result = AutoprefixerRails.process(css, overrideBrowserslist: ["opera 12"]) 18 | expect(result.css).to eq "a {\n" \ 19 | " -o-tab-size: 2;\n" \ 20 | " tab-size: 2\n" \ 21 | "}" 22 | end 23 | 24 | it "has browsers option" do 25 | css = "a {\n tab-size: 2\n}" 26 | result = AutoprefixerRails.process(css, browsers: ["opera 12"]) 27 | expect(result.css).to eq "a {\n" \ 28 | " -o-tab-size: 2;\n" \ 29 | " tab-size: 2\n" \ 30 | "}" 31 | end 32 | 33 | it "process @supports" do 34 | css = "@supports (display: flex) { }" 35 | result = AutoprefixerRails.process(css, overrideBrowserslist: ["chrome 28"]) 36 | expect(result.css).to eq( 37 | "@supports ((display: -webkit-flex) or (display: flex)) { }" 38 | ) 39 | end 40 | 41 | it "generates source map" do 42 | result = AutoprefixerRails.process(@css, map: true) 43 | expect(result.css).to include("/*# sourceMappingURL=data:") 44 | end 45 | 46 | it "generates separated source map" do 47 | result = AutoprefixerRails.process(@css, map: { inline: false }) 48 | expect(result.map).to be_a(String) 49 | end 50 | 51 | it "uses file name in syntax errors", not_jruby: true do 52 | expect do 53 | AutoprefixerRails.process("a {", from: "a.css") 54 | end.to raise_error(/a.css:/) 55 | end 56 | 57 | it "includes sourcesContent by default" do 58 | map = AutoprefixerRails.process("a{}", map: { inline: false }).map 59 | expect(map).to include("sourcesContent") 60 | end 61 | 62 | it "maps options from Ruby style" do 63 | map = AutoprefixerRails.process("a{}", map: { 64 | sources_content: false, 65 | inline: false 66 | }).map 67 | 68 | expect(map).not_to include("sourcesContent") 69 | end 70 | 71 | it "does not remove old prefixes on request" do 72 | css = "a { -moz-border-radius: 5px; border-radius: 5px }" 73 | result = AutoprefixerRails.process(css, remove: false) 74 | expect(result.css).to eq(css) 75 | end 76 | 77 | it "shows debug" do 78 | info = AutoprefixerRails.processor(overrideBrowserslist: ["chrome 25"]).info 79 | expect(info).to match(/Browsers:\n Chrome: 25\n\n/) 80 | expect(info).to match(/ transition: webkit/) 81 | end 82 | 83 | it "returns warnings" do 84 | css = "a{background:linear-gradient(top,white,black)}" 85 | result = AutoprefixerRails.process(css) 86 | expect(result.warnings).to eq([":1:3: Gradient has outdated " \ 87 | "direction syntax. New syntax is like `to left` instead of `right`."]) 88 | end 89 | 90 | it "shows correct error on country statistics" do 91 | expect do 92 | AutoprefixerRails.process("", overrideBrowserslist: "> 1% in US") 93 | end.to raise_error(/Use Autoprefixer with webpack/) 94 | end 95 | 96 | context "Sprockets" do 97 | before :each do 98 | @assets = Sprockets::Environment.new 99 | @assets.append_path(@dir.join("app/app/assets/stylesheets")) 100 | AutoprefixerRails.install(@assets, overrideBrowserslist: ["chrome 25"]) 101 | end 102 | 103 | it "integrates with Sprockets" do 104 | css = @assets["test.css"].to_s 105 | expect(css).to eq "a {\n" \ 106 | " -webkit-mask: none;\n" \ 107 | " mask: none\n" \ 108 | "}\n" 109 | end 110 | 111 | it "shows file name from Sprockets", not_jruby: true do 112 | expect { @assets["wrong.css"] }.to raise_error(/wrong/) 113 | end 114 | 115 | it "supports disabling", not_jruby: true do 116 | AutoprefixerRails.uninstall(@assets) 117 | css = @assets["test.css"].to_s 118 | expect(css).to eq "a {\n" \ 119 | " mask: none\n" \ 120 | "}\n" 121 | end 122 | end 123 | end 124 | -------------------------------------------------------------------------------- /spec/processor_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative "spec_helper" 4 | 5 | describe AutoprefixerRails::Processor do 6 | it "parses config" do 7 | config = "# Comment\n ie 11\n \nie 8 # sorry\n[test ]\nios 8" 8 | processor = AutoprefixerRails::Processor.new 9 | expect(processor.parse_config(config)).to eql({ 10 | "defaults" => ["ie 11", "ie 8"], 11 | "test" => ["ios 8"] 12 | }) 13 | end 14 | 15 | context "without Rails" do 16 | before do 17 | hide_const("Rails") 18 | end 19 | 20 | it "doesn't raise error during processing" do 21 | processor = AutoprefixerRails::Processor.new 22 | expect do 23 | processor.process("") 24 | end.not_to raise_error 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /spec/rails_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative "spec_helper" 4 | 5 | describe CssController, type: :controller do 6 | before :all do 7 | cache = Rails.root.join("tmp/cache") 8 | cache.rmtree if cache.exist? 9 | end 10 | 11 | def test_file(file) 12 | if Rails.version.split(".").first.to_i >= 5 13 | get :test, params: { file: file } 14 | else 15 | get :test, file: file 16 | end 17 | end 18 | 19 | it "integrates with Rails and Sass" do 20 | test_file "sass" 21 | expect(response).to be_successful 22 | clear_css = response.body.tr("\n", " ").squeeze(" ").strip 23 | expect(clear_css).to eq "a{-webkit-mask:none;mask:none}" 24 | end 25 | 26 | if Sprockets::Context.instance_methods.include?(:evaluate) 27 | it "supports evaluate" do 28 | test_file "evaluate" 29 | expect(response).to be_successful 30 | clear_css = response.body.tr("\n", " ").squeeze(" ").strip 31 | expect(clear_css).to eq "a { -webkit-mask: none; mask: none }" 32 | end 33 | end 34 | end 35 | 36 | describe "Rake task" do 37 | it "shows debug" do 38 | info = `cd spec/app; bundle exec rake autoprefixer:info` 39 | expect(info).to match(/Browsers:\n Chrome: 25\n\n/) 40 | expect(info).to match(/ transition: webkit/) 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /spec/railtie_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative "spec_helper" 4 | 5 | describe AutoprefixedRails::Railtie do 6 | before do 7 | @railtie = AutoprefixedRails::Railtie.instance 8 | end 9 | 10 | context "with config/autoprefixer.yml" do 11 | it "works" do 12 | expect(@railtie.config).to eq(cascade: false, supports: false, env: "test") 13 | end 14 | end 15 | 16 | context "with empty config/autoprefixer.yml" do 17 | before do 18 | file_path = File.join(Rails.application.root, "config/autoprefixer.yml") 19 | allow(File).to receive(:exists?).with(file_path) { true } 20 | allow(::YAML).to receive(:load_file).with(file_path) { false } # empty yaml 21 | end 22 | 23 | it "skips empty YAML" do 24 | expect { @railtie.config }.not_to raise_error 25 | end 26 | 27 | it "works" do 28 | expect(@railtie.config).to eq(env: "test") 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ENV["RAILS_ENV"] ||= "test" 4 | 5 | require_relative "app/config/environment" 6 | require "autoprefixer-rails" 7 | 8 | require "rspec/rails" 9 | 10 | warn "ExecJS runtime is #{ExecJS.runtime.class}" 11 | 12 | RSpec.configure do |c| 13 | c.filter_run_excluding not_jruby: RUBY_PLATFORM == "java" 14 | c.example_status_persistence_file_path = ".rspec_status" 15 | end 16 | 17 | def sprockets_4? 18 | Gem::Version.new(Sprockets::VERSION) > Gem::Version.new("4.0.x") 19 | end 20 | --------------------------------------------------------------------------------