本文整理汇总了TypeScript中shelljs.grep函数的典型用法代码示例。如果您正苦于以下问题:TypeScript grep函数的具体用法?TypeScript grep怎么用?TypeScript grep使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了grep函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should have its module resolution mappings defined in the nested package.json', () => {
const packageJson = p `testing/package.json`;
expect(shx.grep('"main":', packageJson)).toContain(`../bundles/core-testing.umd.js`);
expect(shx.grep('"module":', packageJson)).toContain(`../esm5/testing.js`);
expect(shx.grep('"es2015":', packageJson)).toContain(`../esm2015/testing.js`);
expect(shx.grep('"typings":', packageJson)).toContain(`./testing.d.ts`);
});
开发者ID:cironunes,项目名称:angular,代码行数:7,代码来源:core_package.spec.ts
示例2: replaceVersionPlaceholders
function replaceVersionPlaceholders(filePath: string) {
if (stampData) {
const version = shx.grep('BUILD_SCM_VERSION', stampData).split(' ')[1].trim();
return shx.sed(/0.0.0-PLACEHOLDER/, version, filePath);
}
return shx.cat(filePath);
}
开发者ID:robwormald,项目名称:angular,代码行数:7,代码来源:packager.ts
示例3: replaceVersionPlaceholders
function replaceVersionPlaceholders(filePath: string, content: string) {
if (stampData) {
const version = shx.grep('BUILD_SCM_VERSION', stampData).split(' ')[1].trim();
// Split the replacement into separate strings so we don't match it while publishing
return content.replace(
new RegExp(
'0.0.0' +
'-PLACEHOLDER',
'g'),
version);
}
return content;
}
开发者ID:cironunes,项目名称:angular,代码行数:13,代码来源:packager.ts
示例4: it
it('should have the correct source map paths', () => {
expect(shx.grep('sourceMappingURL', 'fesm5/common.js'))
.toMatch('//# sourceMappingURL=common.js.map');
expect(shx.grep('sourceMappingURL', 'fesm2015/common.js'))
.toMatch('//# sourceMappingURL=common.js.map');
expect(shx.grep('sourceMappingURL', 'fesm5/http.js'))
.toMatch('//# sourceMappingURL=http.js.map');
expect(shx.grep('sourceMappingURL', 'fesm2015/http.js'))
.toMatch('//# sourceMappingURL=http.js.map');
expect(shx.grep('sourceMappingURL', 'fesm5/http/testing.js'))
.toMatch('//# sourceMappingURL=testing.js.map');
expect(shx.grep('sourceMappingURL', 'fesm2015/http/testing.js'))
.toMatch('//# sourceMappingURL=testing.js.map');
expect(shx.grep('sourceMappingURL', 'fesm5/testing.js'))
.toMatch('//# sourceMappingURL=testing.js.map');
expect(shx.grep('sourceMappingURL', 'fesm2015/testing.js'))
.toMatch('//# sourceMappingURL=testing.js.map');
expect(shx.grep('sourceMappingURL', 'fesm5/upgrade.js'))
.toMatch('//# sourceMappingURL=upgrade.js.map');
expect(shx.grep('sourceMappingURL', 'fesm2015/upgrade.js'))
.toMatch('//# sourceMappingURL=upgrade.js.map');
});
开发者ID:marclaval,项目名称:angular,代码行数:22,代码来源:common_package.spec.ts
示例5: it
it('should contain correct version number with the PLACEHOLDER string replaced', () => {
expect(shx.grep('"version":', packageJson)).toMatch(/\d+\.\d+\.\d+(?!-PLACEHOLDER)/);
});
开发者ID:zackarychapple,项目名称:angular,代码行数:3,代码来源:core_package.spec.ts
示例6: expect
() => { expect(shx.grep('"name":', packageJson)).toContain(`@angular/core`); });
开发者ID:zackarychapple,项目名称:angular,代码行数:1,代码来源:core_package.spec.ts
示例7: it
it('should contain module resolution mappings', () => {
expect(shx.grep('"main":', packageJson)).toContain(`dist/zone-node.js`);
});
开发者ID:angular,项目名称:zone.js,代码行数:3,代码来源:npm_package.spec.ts
注:本文中的shelljs.grep函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论