Parses commented css blocks through DSS
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead of Devric:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
index.js
package.json
test.js

README.md

A DSS parser task for Gulp.

You can add additional DSS parsers like this:

dss({
    parsers : {
        'parserName' : function(i,line,block,file) {
            return line
        },
        'template' : function(i,line,block,file) {
            return line
        },
    }
})

In a Gulp build your setup could look like the following:

'use strict';

var gulp = require('gulp'),
    dss = require('gulp-dss'),
    rename = require('gulp-rename');

gulp.task('dss', function() {
  return gulp.src('sass/**/*.scss')
    .pipe(dss({
        parsers: {
            section: function(i, line, block, file) {
                return line;
            }
        }
    }))
    .pipe(rename({
        extname: '.json'
    }))
    .pipe(gulp.dest('dss/'));
});

This would process the DSS blocks and output corresponding JSON files in a dss directory.