1.0.1 • Published 10 years ago

gulp-csstojs v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

gulp-csstojs

Compiler CSS into JavaScript or TypeScript AMD blocks so that they can be "required" and loaded on demand.

Install

Install with npm

$ npm install --save-dev gulp-csstojs

Usage

var gulp = require('gulp'),
    csstojs = require('gulp-csstojs');

gulp.task('default', function() {
    return gulp.src('src/*.css')
        .pipe(csstojs())
        .pipe(gulp.dest('dist'));
});

API

csstojs(options)

options.requireLibrary

Type: String Default: View

The library to require in the define block.

options.methodToCall

Type: String Default: View.loadStyles

The method to call to load the styles.

options.typeScript

Type: Boolean Default: false

Determines if the output should be TypeScript rather than JavaScript.

License

MIT © David Zearing