Commit 109da268 authored by Philip Stier's avatar Philip Stier Committed by Jennifer Dust
Browse files

Issue #3312943 by philip_stier, jldust, pixelwhip, b-ry: Update Frontend Tooling

parent 7823a79c
Loading
Loading
Loading
Loading

.babelrc

deleted100644 → 0
+0 −12
Original line number Diff line number Diff line
{
  "presets": [
    [
      "@babel/preset-env",
      {
        "corejs": 3,
        "shippedProposals": true,
        "useBuiltIns": "usage"
      }
    ]
  ]
}
+1 −1
Original line number Diff line number Diff line
last 4 version
last 4 versions
> .5%
not IE 10
not IE_mob 10
+2 −1
Original line number Diff line number Diff line
BS_PROXY='drupalvm.test'
BS_PROXY='example.lndo.site'
BS_BROWSER='google chrome'
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
12.13.0
16.17.0

.postcssrc.js

deleted100644 → 0
+0 −57
Original line number Diff line number Diff line
const postcssPresetEnv = require('postcss-preset-env');
const postcssInlineSvg = require('postcss-inline-svg');
const pxtorem = require('postcss-pxtorem');
const postcssSvgo = require('postcss-svgo');
const tailwindcss = require('tailwindcss');

// Encode SVG files.
function encode(code) {
  return code
    .replace(/\%/g, '%25')
    .replace(/\</g, '%3C')
    .replace(/\>/g, '%3E')
    .replace(/\s/g, '%20')
    .replace(/\!/g, '%21')
    .replace(/\*/g, '%2A')
    .replace(/\'/g, '%27')
    .replace(/\"/g, '%22')
    .replace(/\(/g, '%28')
    .replace(/\)/g, '%29')
    .replace(/\;/g, '%3B')
    .replace(/\:/g, '%3A')
    .replace(/\@/g, '%40')
    .replace(/\&/g, '%26')
    .replace(/\=/g, '%3D')
    .replace(/\+/g, '%2B')
    .replace(/\$/g, '%24')
    .replace(/\,/g, '%2C')
    .replace(/\//g, '%2F')
    .replace(/\?/g, '%3F')
    .replace(/\#/g, '%23')
    .replace(/\[/g, '%5B')
    .replace(/\]/g, '%5D');
}

module.exports = (ctx) => ({
  plugins: [
    tailwindcss(),
    postcssInlineSvg({
      paths: ['./images'],
      encode,
    }),
    postcssSvgo(),
    pxtorem({
      propList: ['--font*', 'font', 'font*'],
    }),
    postcssPresetEnv({
      stage: 1,
      features: {
        // Custom properties get poyfilled for IE so no need to process them.
        'custom-properties': false,
        'custom-media-queries': {
          importFrom: ['./libraries/global/settings/media-query.css'],
        },
      },
    }),
  ],
});
Loading