gs

gulp-scriptcss

use javascript to insert css to html head

Showing:

Popularity

Downloads/wk

2

Maintenance

No Maintenance Data Available

Package

Dependencies

2

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

gulp-scriptcss

use javascript to insert css to html head

options

  • main, type: String or Array, which file do you want to add window.__scriptCSS__ function.
  • cssdirs, type: String or Array, cssdirs to find css files
  • specials, type: Object, some files have special conditons

example

var gulp = require('gulp')
  , uglify = require('gulp-uglify')
  , scriptCSS = require('gulp-scriptcss')

gulp
  .src(['js/**/*.js'])
  .pipe(uglify())
  .pipe(scriptCSS({
    main: 'main.js',
    specials: {
      'main.js': [
        'css/main1.css',
        'css/main2.css'
      ]
    },
    cssdirs: 'css'
    // cssdirs: ['css1', 'css2']
  }))
  .pipe(gulp.dest('dist'));

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial