小编Avi*_*rry的帖子

SystemJS插件可以修改已经转换的文件吗?

在尝试让Angular(1.x)使用​​systemjs时,我意识到目前没有能力(我知道)自动插入$inject到角度组件中,即使函数的参数受到损坏,这也会使组件保持工作状态.缩小器.手动创建$inject注释很繁琐,容易出错并且违反了DRY主体.

有一个成熟的npm模块ng-annotate,它可以解决这个问题并在许多类似的情况下用于捆绑.正如我一直在探索SystemJS,我发现有一个插件系统包含翻译源代码的能力,这正是ng-annotate它的作用.

但是,从我所看到的,SystemJS只能让您将特定文件扩展名映射到单个加载器,并且所有插件示例都支持新的文件类型.我想做的是对SystemJS的转换过程的输出进行后处理,而不是添加新的文件类型.似乎SystemJS应该能够做到这一点,因为它有一个处理管道,但我无法弄清楚如何以正确的方式挂钩它.现在我使用Browserify来达到同样的效果,但我最终得到了一组相当复杂的构建任务,如果可能的话我想用SystemJS简化它.

其他策略也可以ng-annotate在SystemJS的加载器管道中使用.

node.js angularjs systemjs jspm ng-annotate

6
推荐指数
1
解决办法
179
查看次数

无法加载文件或程序集'Microsoft.AspNet.Security.DataProtection'

升级到最新版本的asp.net-5堆栈时,我在尝试访问SignalR中心时遇到了以下堆栈跟踪.

FileNotFoundException: Could not load file or assembly 'Microsoft.AspNet.Security.DataProtection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) System.Type.GetType(String typeName, Boolean throwOnError) Microsoft.AspNet.DataProtection.KeyManagement.XmlKeyManager.ParseKeyElement(XElement keyElement) Microsoft.AspNet.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys() Microsoft.AspNet.DataProtection.KeyManagement.KeyRingProvider.CreateCachedKeyRingInstanceUnderLock(DateTime utcNow, CachedKeyRing existingCachedKeyRing) Microsoft.AspNet.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRing() Microsoft.AspNet.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] unprotectedData) Microsoft.AspNet.SignalR.Infrastructure.DataProtectionProviderProtectedData.Protect(String data, …

asp.net-core

5
推荐指数
1
解决办法
3785
查看次数

标签 统计

angularjs ×1

asp.net-core ×1

jspm ×1

ng-annotate ×1

node.js ×1

systemjs ×1