Sha256: aee0a522feeda3f600ca05f5dcd912bcb59a2a3782f3bab580d41795eaf26e41

Contents?: true

Size: 1.84 KB

Versions: 14

Compression:

Stored size: 1.84 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')

const resolve = require('path').resolve
module.exports = {
  prefix: 'ariadne-',
  content: {
    files: [
      resolve(__dirname, 'public/*.html'),
      resolve(__dirname, 'app/assets/javascripts/**/*.js'),
      resolve(__dirname, 'app/components/**/*.erb'),
      resolve(__dirname, 'app/components/**/*.rb'),
      resolve(__dirname, 'app/lib/ariadne'),
      resolve(__dirname, '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

14 entries across 14 versions & 1 rubygems

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