From b8a997d68bb8dbe0830f8f4778db1f29cfb2bfaf Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Fri, 26 Apr 2019 14:58:41 -0400 Subject: [PATCH] Make resolveConfig available in user land Adds a new `resolveConfig` file to the project root that can be imported as `tailwindcss/resolveConfig` and used to get a fully merged version of your custom config file. Useful when you want access to your design tokens in JS. --- resolveConfig.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 resolveConfig.js diff --git a/resolveConfig.js b/resolveConfig.js new file mode 100644 index 000000000..776aa3ba4 --- /dev/null +++ b/resolveConfig.js @@ -0,0 +1,6 @@ +const resolveConfigObjects = require('./lib/util/resolveConfig').default +const defaultConfig = require('./stubs/defaultConfig.stub.js') + +module.exports = function resolveConfig(config) { + return resolveConfigObjects([config, defaultConfig]) +}