tailwindcss-export-config
Advanced tools
Comparing version 4.0.1 to 4.1.0
@@ -5,2 +5,9 @@ # Changelog | ||
## [4.1.0](https://github.com/dobromir-hristov/tailwindcss-export-config/compare/v4.0.1...v4.1.0) (2022-07-23) | ||
### Features | ||
* add onlyIncludeKeys ([#60](https://github.com/dobromir-hristov/tailwindcss-export-config/issues/60)) ([ffee472](https://github.com/dobromir-hristov/tailwindcss-export-config/commit/ffee4727966046fba427afe98b3343950179ee12)) | ||
### [4.0.1](https://github.com/dobromir-hristov/tailwindcss-export-config/compare/v4.0.0...v4.0.1) (2022-03-12) | ||
@@ -7,0 +14,0 @@ |
@@ -64,2 +64,10 @@ #!/usr/bin/env node | ||
}) | ||
.option('only-include-keys', { | ||
describe: 'Keys to include exclusivly', | ||
type: 'array', /* array | boolean | string */ | ||
nargs: 1, | ||
coerce: (array = []) => { | ||
return array.flatMap(v => v.split(',')) | ||
} | ||
}) | ||
.argv | ||
@@ -77,2 +85,3 @@ | ||
preserveKeys: argv['preserve-keys'], | ||
onlyIncludeKeys: argv['only-include-keys'], | ||
}) | ||
@@ -79,0 +88,0 @@ converter.writeToFile() |
@@ -100,2 +100,4 @@ 'use strict'; | ||
_defineProperty(this, "onlyIncludeKeys", []); | ||
_defineProperty(this, "prefixContent", ''); | ||
@@ -116,2 +118,3 @@ | ||
if (typeof opts.preserveKeys !== 'undefined') this.preserveKeys = opts.preserveKeys; | ||
if (typeof opts.onlyIncludeKeys !== 'undefined') this.onlyIncludeKeys = opts.onlyIncludeKeys; | ||
} | ||
@@ -261,2 +264,3 @@ /** | ||
_isSettingEnabled(key) { | ||
if (this.onlyIncludeKeys.length) return this.onlyIncludeKeys.includes(key); | ||
const { | ||
@@ -263,0 +267,0 @@ corePlugins |
{ | ||
"name": "tailwindcss-export-config", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "Export Tailwindcss config options to SASS, SCSS, LESS and Stylus", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -371,2 +371,14 @@ <p align="center"> | ||
### Only include keys | ||
When you only want some `corePlugins`, you can explicitly add these using the `onlyIncludeKeys` parameter, both in CLI and in the node api. | ||
``` | ||
tailwindcss-export-config --config=tailwind.config.js --destination=tailwind-variables --format=scss --onlyIncludeKeys=colors,screens | ||
``` | ||
### Note of caution | ||
When using the `onlyIncludeKeys` parameter, defined `corePlugins` and the `preserveKeys` parameter have no effect. | ||
## Compatibility | ||
@@ -373,0 +385,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35876
522
394