Search code examples
gruntjsyeomanbowerbower-installgrunt-contrib-concat

bower add Jquery UI theme in style


In my project I have included to jQuery UI.I am using Bower, Yeoman and Grunt.
I added jQuery UI: bower install jquery-ui --save .
but the jQuery UI theme was not included in Bower style components.

<!-- build:css(.) styles/vendor.css --> 
<!-- bower:css --> 
<link rel="stylesheet" href="bower_components/components-font-awesome/css/font-awesome.css" /> 
<!-- endbower --> 
<!-- endbuild --> 
<!-- build:css(.tmp) styles/main.css ->

Help me with this problem .


Solution

  • This is not issue with library . its in Grunt-wiredep which has problem in injecting dependencies which has file name like jquery-ui,socket-io,font-awesome. there is way to override it .

    wiredep: {
                target: {
                    src: '<%= jericho.client %>/index.html',
                    ignorePath: '<%= jericho.client %>/',
                    exclude: [/es5-shim.js/, /json3.js/ ,/bootstrap.css/, /font-awesome.css/ ],
                    overrides: {
                        'socket.io-client': {
                            main: 'socket.io.js'
                        },
                        'jqueryui-touch-punch': {
                            main: 'jquery.ui.touch-punch.js'
                        }
                    }
                }
            },

    so add 'jquery-ui': { main: 'jquery-ui.js' } . in the grunt wiredep configuration.

    Link: https://github.com/taptapship/wiredep/issues/86