Giter Site home page Giter Site logo

bower-main's People

Contributors

frodefi avatar jaboko avatar jagtesh avatar vincent-zurczak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bower-main's Issues

bower.json file does not exist

My bower files other folder when i run my gulp tusk this exception return bower.json file does not exist
This errors return when bower( 'css', 'min.css' ) this function run
Why?

Remove duplicate files with gulp-dedupe

For a few days, I've been trying to remove duplicate files from my merge and I found the gulp-dedupe very easy to implement and really useful.

I strongly recommend to use before concat()

return merge2(
      gulp.src('static/src/tpl/*.html')
        .pipe(minifyHtml({empty: true}))
        .pipe(ngtemplate({
          module: 'genTemplates',
          standalone: true
        })
      ), gulp.src([
        'static/src/js/app.js',
        'static/src/js/locale_zh-cn.js',
        'static/src/js/tools.js',
        'static/src/js/services.js',
        'static/src/js/locale_zh-cn.js', //example duplicated file
        'static/src/js/controllers.js'
      ])
    )
    .pipe(dedupe())
    .pipe(concat('app.js'))
    .pipe(gulp.dest('static/dist/js/'));
});

Does not work on windows

Hey frodefi,

I've been using this plugin for some time and it's been working on my linux laptop perfectly. Lately though I've got some new colleagues who work on windows and there it doesn't seem to do anything. It doesn't crash or report anything, but it also doesn't generate the expected files.

Is this an issue you have encountered already?

This is the bower-main part of my gulpfile.js

var bowerMain = require('bower-main');

var bowerMainJavaScriptFiles = bowerMain('js', 'min.js')
var bowerMainCssFiles= bowerMain('css', 'min.css')

gulp.task('bower', function() {
  return gulp.src(bowerMainJavaScriptFiles.normal)
    .pipe(concat('vendor-scripts.js'))
    .pipe(gulp.dest('web/bundles/global/vendor'));
});

gulp.task('bowerprod', function(){
  return merge2(
    gulp.src(bowerMainJavaScriptFiles.minified),
    gulp.src(bowerMainJavaScriptFiles.minifiedNotFound)
      .pipe(concat('tmp.min.js'))
      .pipe(uglify())
    )
    .pipe(concat('vendor-scripts.js'))
    .pipe(gulp.dest('web/bundles/global/vendor'));
});

gulp.task('bowercss', function() {
  return gulp.src(bowerMainCssFiles.normal)
    .pipe(concat('vendor-styles.css'))
    .pipe(gulp.dest('web/bundles/global/vendor'));
});

gulp.task('bowercssprod', function(){
  return merge2(
    gulp.src(bowerMainCssFiles.minified),
    gulp.src(bowerMainCssFiles.minifiedNotFound)
      .pipe(concat('tmp.min.css'))
      .pipe(uglify())
    )
    .pipe(concat('vendor-styles.css'))
    .pipe(gulp.dest('web/bundles/global/vendor'));
});

Please add deprecated note!

This is not useful anymore and I recommend to use main-bower-files directly or even better switch to yarn/npm. Can you add the deprecated note?

Not getting all expected css files.

For some reason not all the expected css files are found. In my current setup, bower-main misses the css files for bootstrap and only returns the ones from Datatables. I believe it might be due to the underlying bower-main-files but I can't tell with certainity.

These are my bower.json and gulpfile.js

   "ignore": [
        "**/.*",
        "node_modules",
        "bower_components",
        "test",
        "tests"
    ],
    "dependencies": {
        "bootstrap": ">=3.1.1",
        "jquery": ">=2.1.0",
        "DataTables": ">=1.10.7",
        "bootbox": ">=4.4.0"
    }
}
var bowerMainCssFiles = bowerMain('css', 'min.css');

gulp.task('bowercss', function() {                                                                 
     return gulp.src(bowerMainCssFiles.normal)                                                        
       .pipe(concat('vendor-styles.css'))                                                             
       .pipe(gulp.dest('web/bundles/global/vendor'));                                                 
 });    

Doesn't brings sammy main file

I am trying to use this package with Sammy framework, but it doesn't bring the main file of this package. Here is my Gulp task:

var gulp   = require('gulp'),
    bower  = require('bower-main'),
    concat = require('gulp-concat');

gulp.task('script', function() {

    return gulp.src(bower('js').normal)
        .pipe(concat('main.js'))
        .pipe(gulp.dest('app'));
});

It is a problem with Sammy package?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.