0.1.1 • Published 5 years ago

gulp-obj-sass-file v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

gulp-obj-sass-file

gulp plugin for converting Object to scss/sass variable String and output file.

Install

$ npm install gulp-obj-sass-file

Usage

var objSassFile = require('gulp-obj-sass-file'),
    gulp = require('gulp'),
    sass = require('gulp-sass');

gulp.task('conf-to-sass', function() {
  return gulp
    .src([
      'data/config.js',
      'data/config.json',
      'data/config.coffee' // if you use coffee-script
      ])
    .pipe(objSassFile({
      output: {
        path: 'css/variable.scss'
      }
    }))
    .pipe(gulp.dest('./'));
});

options

almost same options with obj-sass.
but output added.

see obj-sass.

output

Type: Object Default: {}
used for File of gulp-util options

output.cwd

Type: String Default: process.cwd()
the current working directory.

output.base

Type: String Default: output.cwd
used for relative pathing. typically where a glob starts.

output.path

Type: String Default: undefined
full path to the file.

License

MIT