1.0.4 • Published 8 years ago

main-bower-min-checked v1.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

main-bower-min-checked

Made to be used with Gulp. Get bower main files as default (defined in 'main') or minified file names array. If no minified version is found for some files, they will be created.

It uses main-bower-files to list bower dependencies, gulp-rename and gulp-uglify to create missing minified files.

Installation

  npm install --save-dev main-bower-min-checked

Example

var bower_files = require('main-bower-min-checked');
var inject = require('gulp-inject');

var main_bower_files_options = {
  includeDev: false,
  paths: {
    bowerDirectory: './lib',
    bowerJson: 'bower.json'
  }
};

var uglify_options = {
  preserveComments: 'all'
};
gulp.src('./index.html')
  .pipe(
    inject(
      gulp.src(
        bower_files(main_bower_files_options).getDefault(), 
        {read: false}
      )
    )
  )
  .pipe(gulp.dest('./'));
gulp.src('./index.html')
  .pipe(
    inject(
      gulp.src(
        bower_files(main_bower_files_options).getMinified(uglify_options), 
        {read: false}
      )
    )
  )
  .pipe(gulp.dest('./'));
1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago