How to use the tailwindcss/resolveConfig function in tailwindcss

To help you get started, we’ve selected a few tailwindcss examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TVke / react-native-tailwindcss / __tests__ / fixtures / testConfigHandler.js View on Github external
import resolveConfig from 'tailwindcss/resolveConfig';

let file = require('tailwindcss/stubs/simpleConfig.stub');

try {
    file = require('./tailwind.config');
} catch (ex) {
}

const {theme} = resolveConfig(file);

module.exports = theme;
github semencov / tailwindcss-font-inter / demo / scripts.js View on Github external
import tailwindConfig from '../tailwind.config.js'
import resolveConfig from 'tailwindcss/resolveConfig';

const { theme: { interFontFeatures, fontSize } } = resolveConfig(tailwindConfig);
const shortText = `
  <p class="font-black">Minute 360</p>
  <p class="font-semibold">Zenith zone</p>
  <p class="font-normal">1234567890!</p>
  <p class="font-thin">Grafik design</p>
`;
const longText = `
  <p class="whitespace-pre-wrap overflow-x-auto">ABCDEFGHIJKLMNOPQRSTUVWXYZ</p>
  <p class="whitespace-pre-wrap overflow-x-auto">abcdefghijklmnopqrstuvwxyz</p>
  <p class="whitespace-pre-wrap overflow-x-auto">0 1 2 3 4 5 6 7 8 9  7*4  7×4  3/4  7÷8  3°  ℃  ℉</p>
  <p class="whitespace-pre-wrap overflow-x-auto">64%  90px  45 kg   $64 $7   €64  £7  1 440 ₽</p>
  <p class="whitespace-pre-wrap overflow-x-auto">Å Ä Ö Ë Ü Ï Ÿ å ä â ö ë ü ï î ÿ Ø ø • ∞ ~</p>
  <p class="whitespace-pre-wrap overflow-x-auto">. ‥ … → ← ↑ ↓</p>
`;

console.log(interFontFeatures, fontSize);
github dobromir-hristov / tailwindcss-export-config / src / converters / utils.js View on Github external
export function resolveConfig (config) {
  if (typeof config === 'string') {
    config = require(config)
  }
  return TWResolveConfig(config)
}
github TVke / react-native-tailwindcss / util / configHandler.js View on Github external
import resolveConfig from 'tailwindcss/resolveConfig';

let file = require('../stubs/simpleConfig.stub');

try {
    file = require('../../../tailwind.config');
} catch (e) {}

const {theme} = resolveConfig(file);

export default theme;