草庐IT

config_local

全部标签

javascript - 无法动态转译 ES 模块 System.config({ transpile : 'transpile-module' })

这是我的tsconfig.js{"compilerOptions":{"experimentalDecorators":true,"emitDecoratorMetadata":true,"moduleResolution":"node","target":"es5","module":"system","noImplicitAny":false,"outDir":"built","rootDir":".","sourceMap":false},"exclude":["node_modules"]我正在使用tsc命令将我的“hello-angular.ts”转译为“hello-angu

javascript - 编辑 ckeditor config.js 没有影响

我更改了我的CKeditorconfig.js文件以包含所有可能的按钮:CKEDITOR.editorConfig=function(config){config.toolbarGroups=[{name:'document',groups:['mode','document','doctools']},{name:'clipboard',groups:['clipboard','undo']},{name:'editing',groups:['find','selection','spellchecker','editing']},{name:'forms',groups:['for

javascript - 如何正确安装 eslint-config-airbnb? `UNMET PEER DEPENDENCY`

➜beslintgit:(master)✗eslint-vv3.15.0➜beslintgit:(master)✗npminstall-geslint-config-airbnbeslint-plugin-jsx-a11yeslint-plugin-importeslint-plugin-react/Users/next/.nvm/versions/node/v7.5.0/lib├──UNMETPEERDEPENDENCYeslint@^3.15.0├─┬eslint-config-airbnb@14.1.0│└──UNMETPEERDEPENDENCYeslint@^3.15.0├─

javascript - "No locale data has been provided"不管传入什么

我正在尝试使用intl进行一些格式化,但无论我作为语言环境传入什么,我总是会收到以下错误消息:ReferenceError:Nolocaledatahasbeenprovidedforthisobjectyet我尝试了以下方法:newIntl.NumberFormat('en-ZA',{minimumFractionDigits:percentDecimals});还有newIntl.NumberFormat(['en-ZA'],{minimumFractionDigits:percentDecimals});我不确定还能做什么。我已将包添加到package.json"intl":"l

javascript - browserify 入门 : import local files?

我一直在制作一个JavaScript应用程序的原型(prototype),现在我想使用browserify进行更强大的设置,并使用require管理依赖项。目前我的应用程序中有以下文件:chart.jsform.jshighcharts-options.jsvendor/highcharts.jsjquery.jshighcharts-options.js基本上是一个常量列表,而chart.js看起来像这样......varmyChart={setup:function(data){...this.render(data);},render:function(data){...}},和

javascript - Chrome.Storage.Local 持久化

全部。我已经开始使用Chrome的各种API开发小型扩展程序,尽管一切正常,但我仍然对一些事情感到好奇。两个问题,如果你们不介意帮我解决的话:1.谁能告诉我chrome.storage.local的持久性限制是什么?我已经自己尝试过各种测试,例如使用chrome.storage.local.set()存储一些东西,清除我所有的浏览器历史记录、cookie等,然后查看是否一切都还在那里。通常它还会在那里,但有时我稍后再回来查看它就会消失。总的来说,我一直无法明确标记我正在做的事情,即偶尔清除.local数据。2.到目前为止,我主要使用chrome.storage.sync,同时没有使用C

javascript - Node JS 在 module.exports 中调用一个 "local"函数

如何在module.exports声明中从另一个函数中调用一个函数?我有MVC结构Nodejs项目和一个名为TestController.js的Controller。我想在Controller中访问方法,但是使用this关键字会出现以下错误:cannotcallmethodgetNameofundefined"usestrict"module.exports={myName:function(req,res,next){//accessingmethodwithincontrollerthis.getName(data);},getName:function(data){//code}

javascript - 错误 "Not allowed to load local resource: file://sharedpath"

这个问题在这里已经有了答案:HowcanIcreatealinktoalocalfileonalocally-runwebpage?(5个答案)关闭5年前。以下代码在chrome中的服务器(nodejs)上运行时不起作用Openfolder.我在开发者工具中收到以下错误消息:Notallowedtoloadlocalresource:file://sharedpath但是当在浏览器(新标签)中打开相同路径(file://sharedpath)时,我能够看到该路径的文件夹结构。同样在IE中工作正常。这是Chrome的问题吗?或者这是在服务器上运行时的问题?有人可以就这个问题提出建议吗?

javascript - 使用 Moment JS : Cannot find module "./locale" 创建 React 应用程序

刚刚在我的Web应用程序上运行了一个npmupdate,现在MomentJS似乎失败并显示以下消息:Error:Cannotfindmodule"./locale"\node_modules\moment\src\lib\moment\prototype.js:1>1|import{Moment}from'./constructor';不确定在更新之前我使用的是什么版本的MomentJS,但我的应用程序已经运行了几个月。我创建了另一个React应用程序并运行了npminstallmoment--save并修改了源代码以显示时间,但最终出现了与上述相同的错误。不确定是否有使用Create

javascript - CSSLint : How to config tasks just print error not warning

我是Grunt-csslint插件的新手,在我运行cssLint任务完成后,有很多错误和警告我无法跟进。那么如何配置任务只打印出错误,而不是警告?? 最佳答案 如果您使用grunt-contrib-csslint您可以在.csslintrc文件中指定选项。来自grunt-contrib-csslint自述文件:OptionsAnyspecifiedoptionwillbepassedthroughdirectlytocsslint,thusyoucanspecifyanyoptionthatcsslintsupports.Thecs