Skip to content

Commit

Permalink
fix: do not generate unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Korzunin committed Sep 14, 2021
1 parent 655de63 commit e5fe2ac
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 117 deletions.
1 change: 0 additions & 1 deletion plop/index.ts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { tryLoadEnvs } from '@prisma/sdk';
import { mergeDeepRight } from 'ramda';
import path from 'path';

import { findSync } from './utils';
import config from './config.json';
import * as models from './models';

Expand Down
1 change: 0 additions & 1 deletion prisma/sequelize/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { tryLoadEnvs } from '@prisma/sdk';
import { mergeDeepRight } from 'ramda';
import path from 'path';

import { findSync } from './utils';
import config from './config.json';
import * as models from './models';

Expand Down
112 changes: 0 additions & 112 deletions prisma/sequelize/utils/find.ts

This file was deleted.

1 change: 0 additions & 1 deletion prisma/sequelize/utils/index.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ generatorHandler({

try {
const plop = nodePlop(path.join(__dirname, '../plop/plopfile.js'), { destBasePath: outputDir, force: true });
const utilsGenerator = plop.getGenerator('utils');
// const utilsGenerator = plop.getGenerator('utils');
const indexGenerator = plop.getGenerator('index.ts');
const modelGenerator = plop.getGenerator('Model.ts');

Expand All @@ -54,7 +54,7 @@ generatorHandler({
const { models } = transformDMMF(options.dmmf);

await Promise.all([
utilsGenerator.runActions({}),
// utilsGenerator.runActions({}),
indexGenerator.runActions({ models, config: JSON.stringify(config, null, 2) }),
...models.map((model) => modelGenerator.runActions(model)),
]);
Expand Down

0 comments on commit e5fe2ac

Please sign in to comment.