Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

bower_concat does nothing #75

Open
alpham8 opened this issue Oct 12, 2016 · 4 comments
Open

bower_concat does nothing #75

alpham8 opened this issue Oct 12, 2016 · 4 comments

Comments

@alpham8
Copy link

alpham8 commented Oct 12, 2016

Hi,
I tried to install bower_concat to make things easy with grunt compilation. I have included the following dependencies in my bower.json:

// [...] usually things above
"devDependencies": {
    "bootstrap-sass": "boostrap-sass#^3.3.7",
    "jquery": "^3.1.1",
    "jquery-ui": "jqueryui#^1.12.1",
    "jqueryui-bootstrap": "^1.0.0",
    "html5shiv": "^3.7.3",
    "respond": "^1.4.2",
    "moment": "^2.15.1",
    "fullcalendar": "^3.0.1",
    "Swiper": "idangerous-swiper#^3.3.1",
    "jquery-validation": "jquery-validate#^1.15.1",
    "slidebars": "^2.0.2",
    "tinymce": "^4.4.3",
    "tinymce-i18n": "^4.0.0",
    "globalize": "^1.1.1"
  }

And my Gruntfile for the bower_concat task looks like this:

bower_concat:
            {
                all:
                {
                    dest:
                    {
                        "js": "web/assets/js/vendors.js",
                        "css": "web/assets/styles/vendors.css"
                    },
                    exclude:
                    [
                        "cldr-data",
                        "cldrjs"
                    ],
                    nonull: true
                }
            },

So, as I understand that task, it should resolve everything based on my bower.json packages. But I actually does nothing.

And another question in this context: Is that issue with the Bootstrap mainFiles configuration in addition to new bower specs fixed now or not? I could not figure it out on the threads below here.

@inakrin
Copy link

inakrin commented Dec 12, 2016

+1

@jbanahan
Copy link

I'm having a similar issue

Just for the sake of troubleshooting have you tried just having those under dependencies instead of devDependecies? Have you tried to use the include?

bower_concat: {
     all: {
       dest: { 
         'js': 'dist/dependencies.js', 
         'css': 'dist/dependencies.css' 
       },
       include: [
         'jquery',
         'bootstrap-sass'
       ],
       bowerOptions: {
         separator: ';'
       }
     }
   }

@alpham8
Copy link
Author

alpham8 commented Jun 30, 2018

@Fir3Chi3f No I haven't. But I don't use bower anymore, since I think bower does nothing, that you can't do using npm and Grunt.
I have now an optimized Gruntfile for doing the assets trick at many levels: Compile SCSS, autoprefixer for CSS, image optimizer and UglifyJs (will be soon replaced by the TypeScript Compiler, because UglifyJS 2 supports only up to ECMAScript 2015).
This works great for me and you get compiled / optimized files in folders of my choice. These work flow completely replaces bower.

@jbanahan
Copy link

jbanahan commented Jul 2, 2018

Thanks for the response @alpham8. Going to be migrating away from Bower pretty soon as well. I was able to work around this for now using mainFiles as such:

    bower_concat: {
      all: {
        dest: { 
          'js': 'dist/dependencies.js', 
          'css': 'dist/dependencies.css' 
        },
        mainFiles: {
          bootstrap: ['dist/css/bootstrap.min.css', 'dist/js/bootstrap.min.js'],
          jquery: 'dist/jquery.min.js'
        },
        bowerOptions: {
          separator: ';'
        }
      }
    }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants