test-project.js 1.6 KB

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. /**
  3. * Use of this source code is governed by an MIT-style license that can be
  4. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  5. */
  6. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  7. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  8. return new (P || (P = Promise))(function (resolve, reject) {
  9. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  10. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  11. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  12. step((generator = generator.apply(thisArg, _arguments || [])).next());
  13. });
  14. };
  15. Object.defineProperty(exports, "__esModule", { value: true });
  16. exports.createTestProject = createTestProject;
  17. /** Create a base project used for testing. */
  18. function createTestProject(runner_1, projectType_1) {
  19. return __awaiter(this, arguments, void 0, function* (runner, projectType, appOptions = {}, tree) {
  20. const workspaceTree = yield runner.runExternalSchematic('@schematics/angular', 'workspace', {
  21. name: 'workspace',
  22. version: '6.0.0',
  23. newProjectRoot: 'projects'
  24. }, tree);
  25. return runner.runExternalSchematic('@schematics/angular', projectType, Object.assign({ name: 'ng-zorro' }, appOptions), workspaceTree);
  26. });
  27. }
  28. //# sourceMappingURL=test-project.js.map