diff --git a/src/app/core/code/code.service.ts b/src/app/core/code/code.service.ts index 8b5dd782e..d27f636b7 100644 --- a/src/app/core/code/code.service.ts +++ b/src/app/core/code/code.service.ts @@ -31,30 +31,10 @@ export class CodeService { return `node_modules/@delon/theme/${this.appSrv.theme}.css`; } - private genPackage({ - dependencies = [], - includeCli = false - }: { - dependencies: string[]; - includeCli: boolean; - }): Record> { + private genPackage({ includeCli = false }: { includeCli: boolean }): Record> { const ngCoreVersion = pkg.dependencies['@angular/core']; // const mainVersion = ngCoreVersion.substring(1).split('.').shift(); const res = packageJSON as Record; - [ - 'ng-zorro-antd', - 'ng-antd-color-picker', - '@delon/theme', - '@delon/abc', - '@delon/chart', - '@delon/acl', - '@delon/auth', - '@delon/cache', - '@delon/mock', - '@delon/form', - '@delon/util', - ...dependencies - ]; if (includeCli) { res.devDependencies = { '@angular-devkit/build-angular': '^17.0.0', @@ -136,7 +116,7 @@ export class CodeService { const res = this.parseCode(appComponentCode); const json = deepCopy(angularJSON); json.projects.demo.architect.build.options.styles.splice(0, 0, this.themePath); - const packageJson = this.genPackage({ dependencies: [], includeCli }); + const packageJson = this.genPackage({ includeCli }); packageJson.description = title; const files: Record = { 'angular.json': `${JSON.stringify(json, null, 2)}`, @@ -188,7 +168,7 @@ export class CodeService { const mockObj = this.genMock; const json = deepCopy(angularJSON); json.projects.demo.architect.build.options.styles.splice(0, 0, this.themePath); - const packageJson = this.genPackage({ dependencies: [], includeCli }); + const packageJson = this.genPackage({ includeCli }); // packageJson.name = 'NG-ALAIN'; packageJson.description = title; const files: { diff --git a/src/app/core/code/files/package.json.ts b/src/app/core/code/files/package.json.ts index 63e5a0ff2..bdea5eaa4 100644 --- a/src/app/core/code/files/package.json.ts +++ b/src/app/core/code/files/package.json.ts @@ -32,6 +32,7 @@ export default { '@delon/mock': '~17.0.3', '@delon/form': '~17.0.3', '@delon/util': '~17.0.3', + 'ng-zorro-antd': '^17.1.0', 'ng-antd-color-picker': '^0.0.2', ajv: '^8.12.0', 'ajv-formats': '^2.1.1',