Skip to content

gulp plugin for converting Object to scss/sass variable String with gulp-sass (gulp-ruby-sass).

License

Notifications You must be signed in to change notification settings

devjam/gulp-obj-sass-inline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-obj-sass-inline

gulp plugin for converting Object to scss/sass variable String with gulp-sass (gulp-ruby-sass).

Install

$ npm install gulp-obj-sass-inline

Usage

var objSassInline = require('gulp-obj-sass-inline'),
    gulp = require('gulp'),
    sass = require('gulp-sass');

gulp.task('sass', function() {
  return gulp
    .src(['example.scss'])
    .pipe(objSassInline({
      obj: {
        key: 'value',
        obj: {
            key: 0
        },
        array: [1, 2, 3]
      }
    }))
    .pipe(sass())
    .pipe(gulp.dest('build/'));
});

// below variables will be inserted before the example.scss.
// so you can use the variables in the example.scss.
//
// $key: value;
// $obj-key: 0;
// $array-0: 1;
// $array-1: 2;
// $array-2: 3;
//

options

same options with obj-sass.

see obj-sass.

License

MIT

About

gulp plugin for converting Object to scss/sass variable String with gulp-sass (gulp-ruby-sass).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published