Sha256: 20abee97629fe252cdc6883685426ce545b59c512b516520e5004200789abacf

Contents?: true

Size: 943 Bytes

Versions: 12

Compression:

Stored size: 943 Bytes

Contents

const defaultTheme = require('tailwindcss/defaultTheme')
const plugin = require('tailwindcss/plugin')
const path = require("path")
const fs = require("fs");

const usePlugin = (pluginName) => plugin(({ addUtilities, postcss }) => {
  const pluginPath = path.join(__dirname, "../tmp/tailwindcss-plugin/", pluginName + ".css")
  const css = fs.readFileSync(pluginPath, 'utf8')
  addUtilities(postcss.parse(css).nodes)
})


module.exports = {
  content: [
    './public/*.html',
    './app/helpers/**/*.rb',
    './app/javascript/**/*.js',
    './app/views/**/*.{erb,haml,html,slim}'
  ],
  theme: {
    extend: {
      fontFamily: {
        sans: ['Inter var', ...defaultTheme.fontFamily.sans],
      },
    },
  },
  plugins: [
    require('@tailwindcss/forms'),
    require('@tailwindcss/aspect-ratio'),
    require('@tailwindcss/typography'),
    // usePlugin(pluginName) => plugin name is based on that defined in tailwind.plugins.yml
  ]
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tailwindcss-rails-plugable-2.0.12.pre.dev-x86_64-darwin lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.12.pre.dev-x64-mingw-ucrt lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.12.pre.dev-x64-mingw32 lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.12.pre.dev lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.12.pre.dev-arm64-darwin lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.12.pre.dev-aarch64-linux lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.12.pre.dev-x86_64-linux lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.11.pre.dev-x86_64-linux lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.11.pre.dev-x86_64-darwin lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.11.pre.dev-x64-mingw-ucrt lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.11.pre.dev-x64-mingw32 lib/install/tailwind.config.js
tailwindcss-rails-plugable-2.0.11.pre.dev-aarch64-linux lib/install/tailwind.config.js