bower add Jquery UI theme in style

亡梦爱人 提交于 2020-01-02 10:03:52

问题


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 .


回答1:


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



来源:https://stackoverflow.com/questions/27407093/bower-add-jquery-ui-theme-in-style

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!