我正在尝试将jquery-validation添加到visual studio 2015中的项目.当我向bower.json添加"jquery-validation"时,我看到jquery-validation文件夹被添加到wwwroot/lib /但是没有dist /文件夹.
jquery-validation软件包看起来需要构建,但我无法看到如何在visual studio 2015中构建.右键单击grunt文件不会显示任务运行器资源管理器.
如果我使用命令窗口并尝试在wwwroot/lib/jquery-validation /文件夹中使用"npm install"和"grunt",则在"jscs:all"任务后出现错误:
Running "jscs:all" (jscs) task
Fatal error: Neither config file nor grunt options were defined
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.0
npm ERR! npm v2.14.20
npm ERR! code ELIFECYCLE
npm ERR! jquery-validation@1.15.1-pre prepublish: `grunt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jquery-validation@1.15.1-pre prepublish script 'grunt'.
npm ERR! This is most likely a problem with the …Run Code Online (Sandbox Code Playgroud) 我试图通过Azure Notification Hub支持iOS和Android平台.
iOS平台需要以下形式的有效负载:
{"aps":{"alert":"通知中心测试通知"}}
而Android平台需要以下形式的有效负载:
{"data":{"message":"通知中心测试通知"}}
我知道可以修改有效负载以包含更多信息,但该示例足以满足该问题.
鉴于我根据标签向目的地发送通知,并且我不保留每个推送通知注册使用哪个平台的记录是发送通知两次的唯一选择,一次是针对apple native,另一次针对gcm native?
hubClient.SendAppleNativeNotificationAsync(payload,tag); hubClient.SendGcmNativeNotificationAsync(payload,tag);
或者,是否有办法向Azure Notification Hub发送包含多个有效负载的通知,然后通知中心将使用适用于目标设备的有效负载?