草庐IT

after_build

全部标签

javascript - 选择 2 : Update option after selecting new tag

我实现了一个标签系统,您可以在其中选择现有标签或添加新标签。选择新标签后,它将使用AJAX调用保留。为了实现这一点,我使用回调createTag和事件select2:select。因为我喜欢只在标记被选中时才创建标记,所以如果事件select2:select被触发,我会为此执行AJAX调用。问题是我需要使用从将新标签持久保存到数据库中获得的ID更新已创建的select2选项。最干净的解决方案是什么?这是我所拥有的:$('select.tags').select2({tags:true,ajax:{url:'{{path('tag_auto_complete')}}',processRe

javascript - 为什么谷歌建议将 Analytics 异步代码放在 <head> 中的 *after* 脚本中?

为什么谷歌建议在您的html中将js脚本放在分析异步跟踪代码之前?http://code.google.com/apis/analytics/docs/tracking/asyncMigrationExamples.html引用如下:"Note:Toensurethemoststreamlinedoperationoftheasynchronoussnippetwithrespecttootherscripts,werecommendyouplaceotherscriptsinyoursiteinoneoftheseways:beforethetrackingcodesnippetin

javascript - webpack build less files 输出一个 css minify 文件

webpack是我需要将几个较少的文件传递到一个缩小的CSS文件中的工具吗?如果是这样,我不确定我在下面的代码中做错了什么?有没有办法输出到不同的文件路径,现在我的js文件输出到'./assets/javascripts/bundle/',我希望我的css文件输出到'。/assets/stylesheets/bundle/',我该怎么做?更新我做了一个测试,我可以将我的less文件构建到一个css文件,但仍然无法找到如何为输出文件夹设置多个路径,现在我必须注释掉js入口部分并更改输出路径...网络包配置varpath=require('path');varwebpack=require

javascript - 网络包 : How to convert variables on build

关于使用Vue(vue-loader)+Webpack和Chromatism示例:(在开发/源代码上)lettextColor=chromatism.contrastRatio('#ffea00').cssrgb//=>rgb(0,0,0)是否可以告诉Webpack将转换为rgb(0,0,0)buildversion?因此在buildversion上应该转换成如下内容:(为了性能)lettextColor='rgb(0,0,0)' 最佳答案 正如之前的回答和评论已经提到的,没有现成的AOT编译器来处理这种情况(我的意思是这是一个非常

javascript - 我如何检查 after block 中是否有任何 mocha 测试失败?

describe('sometests',function(){/**Runsometests...*/})after(function(){failures=?//如果测试失败,我会用它来保持chromedriver的浏览器打开,并返回到reportsuccessorfailuretosaucelabs.Mocha的运行者和记者havetheinfoI'mlookingfor作为stats但我不确定如何从测试文件中获取它们。 最佳答案 我找到了这个问题的答案hereafterEach(function(){if(this.curr

javascript - 语义 ui 的 `gulp build` 给出错误 'ENOENT: no such file or directory'

版本:gulp@3.9.1我已经通过npminstall安装了semantic-ui并在交互式设置过程中给出了默认设置。但是当我从/semantic文件夹执行gulpbuild时,我收到以下错误:[20:52:27]Starting'build'...BuildingSemantic[20:52:27]Starting'build-javascript'...BuildingJavascript[20:52:27]Starting'build-css'...BuildingCSS[20:52:27]Starting'build-assets'...Buildingassets[20:5

javascript - 如何停止警告 : It looks like you're using the development build of the Firebase JS SDK?

Itlookslikeyou'reusingthedevelopmentbuildoftheFirebaseJSSDK.WhendeployingFirebaseappstoproduction,itisadvisabletoonlyimporttheindividualSDKcomponentsyouintendtouse.FortheCDNbuilds,theseareavailableinthefollowingmanner(replacewiththenameofacomponent-i.e.auth,database,etc):https://www.gstatic.com/

javascript - 模块构建错误 : pngquant ENOENT - webpack build succeeds on local OS X, 在 AWS Ubuntu 16.04 服务器上失败

我试图从头到尾找到答案,但似乎还没有答案。我正在使用React-Toolbox、React-Bootstrap和一些自定义scss。在我的本地机器上,构建工作正常。当我启动AWSUbuntu服务器并进行基本的节点生产设置时,在我的图像上构建失败。我正在使用Image-Webpack-Loader。我在文件加载器上链接它。这是我的生产webpack文件(对此的任何提示也非常感谢。总是认真学习)letwebpack=require('webpack');letHtmlWebpackPlugin=require('html-webpack-plugin');letExtractTextPlu

javascript - 未捕获的类型错误 : Cannot read property 'call' of undefined after webpack rebuild CommonsChunkPlugin

我在尝试请求html文件时遇到一个奇怪的错误。有问题的代码是用typescript编写并使用webpack的AngularJs应用程序。应用程序指令.ts//require('./app.scss');//importAppControllerfrom'./app.controller';functionAppDirective():ng.IDirective{return{restrict:'E',scope:{},controllerAs:'vm',//controller:AppController,controller:()=>{},//template:require('./

javascript - Chrome : After removed formatted text, 新输入的文本具有相同的样式

当我从contenteditable字段中删除所有内容,然后开始键入包含在与已删除文本相同的标记中的新文本时,尽管在调试器中没有相关元素。例子:预期的行为如下(在Firefox中得到):有人可以帮我解决这个问题吗?附言如果需要任何额外信息,请告诉我。 最佳答案 尝试粘贴您通常需要的字体大小的文本。这将为您更改字体大小。如果您想为整个contenteditable字段选择字体大小,请尝试将其添加到您的CSS。 关于javascript-Chrome:Afterremovedformatte