我刚刚开始在Visual Studio 2013中使用CTP3.1.
我正在创建一个angularjs-ionic应用程序,我希望能够下载并运行网上提供的一些离子示例,例如https://github.com/bgoetzmann/ionic-persistence(只是为了引用一).
我注意到,通常,在github下找到的示例应用程序具有与Visual Studio不同的结构(可能,它们具有VS的"dist"结构).通常,他们依靠grunt或gulp + bower来执行一些构建任务.
获取此类项目并将其导入VS的推荐方法是什么?
除了尝试将它们复制并粘贴到新的Cordova项目中之外,还有其他有效的方法吗?
谢谢
我正在尝试使用ng-html2js来填充我的$ templateCache来运行一些单元测试.
问题是,我的模板位于不同的项目上,我使用它们的相对路径:
preprocessors: {
'..//project2//Content//Templates/**/*.html': ['ng-html2js']
},
Run Code Online (Sandbox Code Playgroud)
它将缓存条目存储为:
"C:\用户\用户\文件\ GitHub的\ solutiondir \项目2 \内容\模板\"
题:
是否有任何stripPrefix值可用于删除整个:
C:\ Users\user\Documents\GitHub\solutiondir\project2 \,无论用户名如何都可以使用?
它可能基本上是找出正确的正则表达式,因为预处理器的代码是这样的:
var log = logger.create('preprocessor.html2js');
var moduleName = config.moduleName;
var stripPrefix = new RegExp('^' + (config.stripPrefix || ''));
var prependPrefix = config.prependPrefix || '';
var stripSufix = new RegExp((config.stripSufix || '') + '$');
var cacheIdFromPath = config && config.cacheIdFromPath || function(filepath) {
return prependPrefix + filepath.replace(stripPrefix, '').replace(stripSufix, '');
};
Run Code Online (Sandbox Code Playgroud)