Skip to content

Instantly share code, notes, and snippets.

@dcharbonnier
Created November 14, 2016 12:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcharbonnier/7fe4936cc6000a5f6538566581ea5908 to your computer and use it in GitHub Desktop.
Save dcharbonnier/7fe4936cc6000a5f6538566581ea5908 to your computer and use it in GitHub Desktop.
istanbul ignore with grunt for typescript
grunt.loadNpmTasks('grunt-text-replace');
grunt.initConfig({
'replace': {
default: {
src: ['lib/**/*.js'],
overwrite: true,
replacements: [
{
from: 'var __extends = (this && this.__extends)',
to: '/* istanbul ignore next: TypeScript extends */\nvar __extends = (this && this.__extends)'
},
{
from: 'var __assign = (this && this.__assign)',
to: '/* istanbul ignore next: TypeScript assign */\nvar __assign = (this && this.__assign)'
},
{
from: 'var __decorate = (this && this.__decorate)',
to: '/* istanbul ignore next: TypeScript decorate */\nvar __decorate = (this && this.__decorate)'
},
{
from: 'var __metadata = (this && this.__metadata)',
to: '/* istanbul ignore next: TypeScript metadata */\nvar __metadata = (this && this.__metadata)'
},
{
from: 'var __param = (this && this.__param)',
to: '/* istanbul ignore next: TypeScript param */\nvar __param = (this && this.__param)'
},
{
from: 'var __awaiter = (this && this.__awaiter)',
to: '/* istanbul ignore next: TypeScript metadata */\nvar __awaiter = (this && this.__awaiter)'
}
]
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment