凉亭添加风格的JQuery UI主题 [英] bower add Jquery UI theme in style

查看:159
本文介绍了凉亭添加风格的JQuery UI主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我已经包含了jQuery UI.I使用Bower,Yeoman和Grunt。

我添加了jQuery UI: bower install jquery-ui --save

,但jQuery UI主题未包含在Bower样式组件中。

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

帮我解决这个问题。

解决方案

这不是库问题。它在Grunt-wiredep中有注入依赖文件的问题,这些文件名具有像jquery-ui,socket-io,font-awesome这样的文件名。



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



如此添加'jquery-ui':{main:' jquery-ui.js'}。在grunt wiredep配置中。

链接: https:// github。 com / taptapship / wiredep / issues / 86


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 .

解决方案

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

这篇关于凉亭添加风格的JQuery UI主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆