gulp-csstojs

1.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i gulp-csstojs

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dzearing