gulp-tailwindcss-export-config
v1.0.1
Published
A Gulp Wrapper for tailwindcss-export-config.
Downloads
34
Maintainers
Readme
Export Tailwind config options with Gulp
This is just a simple wrapper for tailwindcss-export-config what can easily integrated within Gulp tasks.
Options
All options, which are available on [email protected]
, are supported. More inforamtion about config uptions can be found in the documentation.
The only option not supported is destination
, because working with gulp
. Therefore gulp.dest
can ber used.
Example Task
let tailwindExportConfig = require('gulp-tailwindcss-config-export');
gulp.task('export-to-scss', () => {
return gulp
.src('path/to/tailwind.config.js')
.pipe(tailwindExportConfig({
output: '_export.scss',
format: 'scss',
flat: true,
quotedKeys: true,
}))
.pipe(gulp.dest('./scss/imports'));
});
Passing the Tailwind Config
Pass as string
via gulp.src
:
gulp.src('path/to/tailwind.config.js')
.pipe(tailwindExportConfig({
output: '_export.scss',
format: 'scss',
}))
.pipe(gulp.dest('./scss/imports'));
Pass as string
via configuration:
// ...
.pipe(tailwindExportConfig({
config: 'path/to/tailwind.config.js',
output: '_export.scss',
format: 'scss',
}))
.pipe(gulp.dest('./scss/imports'));
Pass as object
via configuration:
let tailwindConfig = require('./tailwind.config.js');
// ...
.pipe(tailwindExportConfig({
config: tailwindConfig,
output: '_export.scss',
format: 'scss',
}))
.pipe(gulp.dest('./scss/imports'));