Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

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

About

[no maintenance any more]use javascript to insert css to html head

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.