Sha256: 2f33bd9f844f0045545fa0e663e3a75841a35c93c6f3a39e6f100347eceb6c7e

Contents?: true

Size: 1.7 KB

Versions: 8

Compression:

Stored size: 1.7 KB

Contents

const defaultTheme = require('tailwindcss/defaultTheme')
const colors = require('tailwindcss/colors')

const CLASS_YML_REGEX = /^- "\.([\S-]+)"$/

// for classes in hashes
const CLASS_MAPPINGS = '(?:\\S+|:\\"[\\S-]+\\"): \\"([\\S -]+)\\"'
// for classes in constants
const CLASS_CONSTANT = '[A-Z_]+ = \\"([\\S -]+)\\"'
const CLASS_RB_REGEX = new RegExp(`(?:${CLASS_MAPPINGS}|${CLASS_CONSTANT})'`, 'g')

module.exports = {
  prefix: 'ariadne-',
  content: {
    files: [
      './public/*.html',
      './app/assets/javascripts/**/*.js',
      './app/components/**/*.erb',
      './app/components/**/*.rb',
      './app/lib/ariadne',
      './static/classes.yml'
    ],
    extract: {
      yml: content => {
        const matches = content.match(CLASS_YML_REGEX)
        return matches ? matches[1].split(/\s+/) : []
      },
      rb: content => {
        const matches = content.match(CLASS_RB_REGEX)
        return matches ? matches[1].split(/\s+/) : []
      }
    }
  },
  theme: {
    extend: {
      colors: {
        'billy-purple': '#a700a0',

        'state-closed': '#da1e28',
        'state-open': '#198038',

        'list-hover': colors.indigo['50'],
        'filter-panel': colors.amber['100'],

        'button-text-color': colors.indigo['700'],
        'button-bg-color': colors.indigo['100'],
        'button-hover-color': colors.indigo['200'],

        'internal-message': colors.amber['100']
      },
      fontFamily: {
        sans: ['Inter var', ...defaultTheme.fontFamily.sans]
      },
      zIndex: {
        max: '9999'
      }
    }
  },
  plugins: [
    require('@tailwindcss/aspect-ratio'),
    require('@tailwindcss/line-clamp'),
    require('@tailwindcss/forms'),
    require('@tailwindcss/typography')
  ]
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.10 tailwind.config.js
ariadne_view_components-0.0.10-x86_64-linux tailwind.config.js
ariadne_view_components-0.0.10-x86_64-darwin tailwind.config.js
ariadne_view_components-0.0.10-x64-mingw32 tailwind.config.js
ariadne_view_components-0.0.10-x64-mingw-ucrt tailwind.config.js
ariadne_view_components-0.0.10-arm64-darwin tailwind.config.js
ariadne_view_components-0.0.10-aarch64-linux tailwind.config.js
ariadne_view_components-0.0.9 tailwind.config.js