UNPKG

generator-begcode

Version:

Spring Boot + Angular/React/Vue in one handy generator

55 lines (54 loc) 3.83 kB
import { asWritingTask } from '../base-application/support/task-type-inference.js'; export default asWritingTask(function cleanupOldFilesTask({ application }) { if (this.isJhipsterVersionLessThan('6.3.0')) { this.removeFile('tslint.json'); } if (this.isJhipsterVersionLessThan('7.0.0-beta.0')) { this.removeFile(`${application.clientSrcDir}app/modules/administration/audits/audits.tsx`); this.removeFile(`${application.clientTestDir}spec/enzyme-setup.ts`); } if (this.isJhipsterVersionLessThan('7.0.0-beta.1')) { this.removeFile(`${application.clientTestDir}jest.conf.js`); this.removeFile(`${application.clientTestDir}spec/icons-mock.ts`); this.removeFile(`${application.clientTestDir}spec/storage-mock.ts`); this.removeFile(`${application.clientTestDir}spec/app/utils.ts`); this.removeFile(`${application.clientTestDir}spec/app/config/axios-interceptor.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/config/notification-middleware.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/shared/reducers/application-profile.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/shared/reducers/authentication.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/shared/util/entity-utils.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/shared/auth/private-route.spec.tsx`); this.removeFile(`${application.clientTestDir}spec/app/shared/error/error-boundary.spec.tsx`); this.removeFile(`${application.clientTestDir}spec/app/shared/error/error-boundary-route.spec.tsx`); this.removeFile(`${application.clientTestDir}spec/app/shared/layout/header/header.spec.tsx`); this.removeFile(`${application.clientTestDir}spec/app/shared/layout/menus/account.spec.tsx`); this.removeFile(`${application.clientTestDir}spec/app/modules/administration/administration.reducer.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/modules/account/register/register.reducer.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/modules/account/activate/activate.reducer.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/modules/account/password/password.reducer.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/modules/account/settings/settings.reducer.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/modules/administration/user-management/user-management.reducer.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/shared/reducers/locale.spec.ts`); this.removeFile(`${application.clientTestDir}spec/app/shared/reducers/user-management.spec.ts`); } if (this.isJhipsterVersionLessThan('7.1.0')) { this.removeFile(`${application.clientSrcDir}app/shared/reducers/action-type.util.ts`); this.removeFile(`${application.clientSrcDir}app/config/devtools.tsx`); } if (this.isJhipsterVersionLessThan('7.4.0') && application.enableI18nRTL) { this.removeFile(`${application.clientSrcDir}content/scss/rtl.scss`); } if (this.isJhipsterVersionLessThan('7.4.1')) { this.removeFile('.npmrc'); } if (this.isJhipsterVersionLessThan('7.7.1')) { this.removeFile(`${application.clientSrcDir}app/entities/index.tsx`); } if (this.isJhipsterVersionLessThan('7.8.2')) { this.removeFile(`${application.clientSrcDir}app/shared/error/error-boundary-route.tsx`); this.removeFile(`${application.clientSrcDir}app/shared/error/error-boundary-route.spec.tsx`); } if (this.isJhipsterVersionLessThan('7.9.3')) { this.removeFile(`${application.clientSrcDir}app/config/translation-middleware.ts`); } });