草庐IT

gulp-data

全部标签

javascript - gulp-usemin 可以接受多个文件吗?

我有一个关于usemin的问题,我不确定它是否是一个错误。我的应用程序结构很简单:-root|-gulpfile.js|-app||-index.html||-about.html||-contact.html||-js||-a.js||-b.js||-c.js||-d.js||-e.js||-dist我的每个html文件中都有一个useminblock来包含所有脚本,例如:当我运行以下任务时:gulp.task('usemin'.function(){gulp.src('app/*.html').pipe(usemin({assetDir:'app/**/'})).pipe(dest

javascript - Kendo UI : One data source, 两个小部件

更新:Hereisalinktoreproducetheproblem相关:ThisisanotherquestionofminewheresimilarproblemsarehappeningwithKendoUIMap,maybeitcouldhelpsomeonefigurethisoneout!它有一个失败版本和一个工作版本。我在Angular单页应用程序中使用KendoUI的DataSource、DropDownList和Map。我想对DropDownList和map使用相同的数据源对象。但是,Map的行为非常难以预测。当我在模板中将DropDownList放在Map之前时,

javascript - 使用 gulp-jasmine 指定依赖关系

我有以下gulpfile.js:vargulp=require('gulp'),jasmine=require('gulp-jasmine');gulp.task('default',function(){returngulp.src('spec/test.js').pipe(jasmine());});spec/test.js中的代码使用全局angular变量,但是,当我运行gulptaskdefault时会抛出一个关于它未定义的错误。假设angular是在全局范围内的文件spec/lib.js中定义的。在test.jsdescribe()之前,我如何告诉jasmine()它需要首先

javascript - Chrome 57 使 .data() 无法正常运行

当用户在Chrome57中工作时,.on("change")事件的这一部分无法正常工作。这只是Chrome57的问题。if中的userId变量在到达这段代码之前已设置并具有值。但是,条件未在应为真时被发现。但是,如果我正在调试并设置了一个断点,我认为if并且我在断点处停止并逗留了一会儿,这是否正常工作。这并不影响所有使用57的人。我只能重现此问题两次,调试后,它就消失了。知道发生了什么以及如何解决它吗?我还会注意到,我们使用的是非常旧的jquery版本-1.11.1,升级并不容易。varselected=$(this).children("option:selected");varna

javascript - yeoman gulp-angular projekt 设置后单元测试出错

...设置有问题。我使用yeoman并使用创建我的项目yogup-angular设置完成后我开始单元测试gulptest但它失败了:PSP:\projects\test-logbook>gulptest[15:15:14]UsinggulpfileP:\projects\mydisk-logbook\gulpfile.js[15:15:14]Starting'scripts'...[15:15:15]allfiles14.08kB[15:15:15]Finished'scripts'after840ms[15:15:15]Starting'test'...2809201715:15:1

javascript - jQuery 1.9.1 中发生了什么变化导致 .data 扩展方法在选择器未返回任何结果时返回 null 而不是 undefined?

最近,我处理的应用程序从jQuery1.7.1升级到1.10.2,其中包括Migrate1.2.1。升级后,我们注意到jQuery为扩展方法返回了不同的结果data取决于选择器是否有任何结果。attr扩展方法总是返回undefined无论选择器结果如何。我使用以下HTML文档对版本1.7.1、1.8.3、1.9.1和1.10.2进行了测试。tryingtoaccess.datamemberoffaselectorthatreturnsnoresults$(function(){vartarget=$("#results");target.append("jQuery"+$.fn.jqu

Elasticsearch与spring data整合api变化

记录spring-data-elasticsearch版本api变化https://blog.csdn.net/zlpzlpzyd/article/details/128255792springboot2.7.x对应 spring-data-elasticsearch 4.4.x排查问题之前先看一下上述链接中版本的对应关系 org.springframework.data.elasticsearch.core.ElasticsearchTemplate找不到该类,但是有一个类是client包下的 org.springframework.data.elasticsearch.client.elc

javascript - 为什么我会在 gulp 中得到 "task completion callback called too many times"?

给定以下gulp任务,为什么我会收到以下错误?Error:taskcompletioncallbackcalledtoomanytimesfunctionmyTask(options,cb){//cbisthegulpcbvarserverInstance=http.createServer(dispatch({/*routes*/}));serverInstance.listen(options.port,function(){cb();//Stacktraceidentifiesthislineasthrowingtheerror});}functionpartial(fn){va

javascript - 为 Google 登录调用 data-onsuccess 方法

我正在尝试整合GoogleSignIn进入我的网络应用。我的页面有Google按钮:ModalDialogue.cshtml:SignupwithGoogle+我试图在我的js中触发该方法:ModalDialogue.js:functiononSignIn(googleUser){varprofile=googleUser.getBasicProfile();console.log('ID:'+profile.getId());//Donotsendtoyourbackend!UseanIDtokeninstead.console.log('Name:'+profile.getName

javascript - 元素中的 "data"属性

运行我的代码没有任何问题。我的问题是:这是我正在做的好事吗?这个跨浏览器/跨平台兼容吗?我正在使用xhtmlstrictdoctype。alert($('#element').attr('data'));现在你可能想知道我为什么不这样做:$('#element').data('json','{"foo":"bar"}');alert($('#element').data('json'));我举个例子说明我为什么要这样做。我正在使用默认头像图像加载一个网站中的所有评论我只想在用户向下滚动时加载正确的图像,因此我需要将正确的图像源存储在某个地方。没有这个我需要做的:$('#avatar-1