我有一个角度小部件,应该将其嵌入不同的站点,并且我对将其嵌入的站点一无所知。
我无法将小部件放置在IFrame中。
这意味着该小部件应100%封装。
小部件正在使用某些库中的组件,例如:
角度引导-https: //angular-ui.github.io/bootstrap/
@角度/材料
这些库中的某些组件使用的视图封装设置为none,这意味着一个问题是我的头部将包含以下内容:
.mat-checkbox {...}
Run Code Online (Sandbox Code Playgroud)
这不是很好的原因,因为它可能会干扰宿主网站的样式。
另一个问题是我负担不起.mat-checkbox之类的类名, 因为这意味着宿主站点可以加载材料设计模板并更改我的小部件外观。
我检查了其他公司的解决方案,例如hotjar
它们没有放在iframe中,它们只是对类名进行哈希处理(可能使用了像typestyle或postcss这样的js中的CSS库)对我来说是一个很好的解决方案-但是
如何从第三方设计(例如材料设计和角度引导)中哈希组件的类名?
我尝试过的事情:
用于创建Web组件的角度元素
字体样式
我最近在Cordova上遇到了添加新目标应用扩展程序的问题.我所拥有的是Cordova应用程序和我创建的自定义Cordova插件.当我向我的ios应用程序添加扩展时(使用XCode - >文件 - >新建 - >目标...应用程序扩展:自定义键盘)然后我尝试安装我的插件,我收到以下错误:
无法安装'paykey-plugin':CordovaError:找不到-Info.plist文件或config.xml文件.在Plugman.addPlugin(/ Users/Yariv/Development /)的Object.parseProjectFile [as parse](/Users/Yariv/Development/workspace/paykey/paykeyCordova/platforms/ios/cordova/lib/projectFile.js:50:15)工作区/ paykey/paykeyCordova/platforms/ios/cordova/lib/plugman/Plugman.js:68:31)在Api.addPlugin(/ Users/Yariv/Development/workspace/paykey/paykeyCordova/platforms/ios/cordova/Api. js:202:40)在/ Users/Yariv/npm/lib /上的handleInstall(/Users/Yariv/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:605:6) node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:403:28 at _fulfilled(/Users/Yariv/npm/lib/node_modules/cordova/node_modules/q/q.js:787:54)at Promise.promise.promiseDispatch上的self.promiseDispatch.done(/Users/Yariv/npm/lib/node_modules/cordova/node_modules/q/q.js:816:30)(/ Users/Yariv/npm/lib/node_modules/cordova /node_modules/q/q.js:749:13)在/Users/Yariv/npm/lib/node_modules/cordova/node_modules/q/q.js:509:49在flush(/ Users/Yariv/npm/lib/node_mo dules/cordova/node_modules/q/q.js:108:17)错误:找不到-Info.plist文件或config.xml文件.[12:38:19]'installPlugins'在1.39秒后发生错误[12:38:19]错误:命令
cordova plugin add ../paykeyCordovaPlugin失败,退出代码1在ChildProcess.exithandler(child_process.js:203:12)处于emitTwo(events.js:87 :13)在Socket的maybeClose(internal/child_process.js:818:16)的ChildProcess.emit(events.js:172:7).(internal/child_process.js:319:11)在emitOne(events.js:77:13)的Socket.emit(events.js:169:7)处于Pipe._onclose(net.js:469:12)
提前致谢
我正在尝试创建自定义迭代.
这是我的代码的简化示例:
class SortedArray {
*[Symbol.iterator]() {
yield 1;
yield 2;
yield 3;
return 4;
}
}
const testingIterables = new SortedArray();
for(let item of testingIterables as any) { // i have to cast it as any or it won't compile
console.log(item);
}
Run Code Online (Sandbox Code Playgroud)
此代码将在ES6上正确运行,但使用TypeScript,它将编译而不打印可迭代值.
这是TypeScript中的错误还是我错过了什么?
谢谢
我有一个coreos kubernetes集群,我开始遵循这篇文章:
TLDR;
> kube-aws init
> kube-aws render
> kube-aws up
Run Code Online (Sandbox Code Playgroud)
一切都很好,我在AWS上有一个kubernetes coreos集群.在文章中有一个警告说:
生产注意:kube-aws生成的TLS密钥和证书不应用于部署生产Kubernetes集群.每个组件证书仅在90天内有效,而CA有效期为365天.如果部署生产Kubernetes集群,请首先考虑独立于此工具建立PKI.
所以我想替换默认证书,所以我遵循以下文章:
TLDR;
我在kubectl和群集之间收到通信错误,抱怨证书
无法连接到服务器:x509:由未知权限签名的证书
我还尝试使用签名证书kubectl指向群集DNS,我为群集设置了DNS.
如何让kubectl与我的集群通信?
提前致谢
编辑:
我的〜/ .kube/config看起来像这样:
apiVersion: v1
clusters:
- cluster:
certificate-authority: /Users/Yariv/Development/workspace/bugeez/bugeez-kubernetes/credentials/ca2.pem
server: https://kubernetes.bugeez.io
name: bugeez
contexts:
- context:
cluster: bugeez
user: bugeez-admin
name: bugeez-system
current-context: bugeez-system
kind: Config
preferences: {}
users:
- name: bugeez-admin
user:
client-certificate: /Users/Yariv/Development/workspace/bugeez/bugeez-kubernetes/credentials/admin2.pem
client-key: /Users/Yariv/Development/workspace/bugeez/bugeez-kubernetes/credentials/admin-key2.pem
Run Code Online (Sandbox Code Playgroud)
编辑:
我的所有证书都是由ca2.pem签名的,我也通过运行来验证这个事实:
openssl verify -CAfile ca2.pem <certificate-name>
Run Code Online (Sandbox Code Playgroud)
编辑:
我认为错误的原因是:当我在控制器和工作人员中切换密钥时,似乎cloud-config正在用旧密钥覆盖我的新密钥.如何更换密钥并更改cloud-config以适应我的更改?
我有一个Jenkins构建服务器和一个远程IIS服务器。我希望我的Jenkins服务器使用MSBuild构建并部署到IIS,并发布我创建的配置文件。发布配置文件是从Visual Studio创建的,从VisualStudio发布时可以正常工作。我正在从Jenkins服务器运行以下命令:
msbuild myproject.csproj /p:DeployOnBuild=True /p:PublishProfile=CustomProfile /p:VisualStudioVersion=14.0 /p:AllowUntrustedCertificate=True
Run Code Online (Sandbox Code Playgroud)
生成成功,但是文件未发布到IIS,并且没有错误报告。
任何人都可以帮助我了解什么是正确的MSBuild命令,该命令还会将新版本发布到IIS服务器。
谢谢
angular ×1
cordova ×1
coreos ×1
ecmascript-6 ×1
iis ×1
ios ×1
iterable ×1
iterator ×1
jenkins ×1
kubectl ×1
kubernetes ×1
msbuild ×1
pki ×1
typescript ×1