Skip to content

Commit 7753b03

Browse files
committed
fix(svg-generator): add ts-nocheck on generated files
1 parent d4c1a4d commit 7753b03

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

svg-generator/generator.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import { GeneratorConfig, defaultConfig } from './config';
55
import { createTree, INDEX } from './tree';
66
import { createTypeFile } from './create-types';
77

8+
function skipTsCheck(fileContent: string) {
9+
return `// @ts-nocheck\n${fileContent}`;
10+
}
11+
812
export function generateSVGIcons(config: GeneratorConfig | null) {
913
if (!config) {
1014
console.log(`Can't find a config object!`);
@@ -24,15 +28,15 @@ export function generateSVGIcons(config: GeneratorConfig | null) {
2428
.filter(({ name }) => name !== INDEX)
2529
.map(({ content }) => content)
2630
.join('\n\n');
27-
outputFileSync(join(mergedConfig.outputPath, `${mergedConfig.rootBarrelFileName}.ts`), allExports, {
31+
outputFileSync(join(mergedConfig.outputPath, `${mergedConfig.rootBarrelFileName}.ts`), skipTsCheck(allExports), {
2832
encoding: 'utf-8',
2933
});
3034

3135
names = virtualTree.filter(({ name }) => name !== INDEX).map(({ name }) => name);
3236
} else {
3337
virtualTree.forEach(({ path, content, name }) => {
3438
name !== INDEX && names.push(name);
35-
outputFileSync(path, content, { encoding: 'utf-8' });
39+
outputFileSync(path, skipTsCheck(content), { encoding: 'utf-8' });
3640
});
3741
}
3842

svg-generator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngneat/svg-generator",
3-
"version": "7.0.1",
3+
"version": "7.0.2",
44
"description": "svg generator",
55
"main": "generator.js",
66
"bin": {

0 commit comments

Comments
 (0)