@blackbaud/skyux-lib-stache
Version:
This library was generated with [Nx](https://nx.dev).
41 lines • 1.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTestApp = createTestApp;
exports.createTestLibrary = createTestLibrary;
const cli_1 = require("@angular/cli");
/**
* Creates a new Angular CLI application.
*/
async function createTestApp(runner, appOptions) {
return await runner.runExternalSchematic('@schematics/angular', 'ng-new', {
directory: '/',
name: appOptions.projectName,
routing: true,
strict: true,
style: 'scss',
version: cli_1.VERSION.major,
...appOptions.options,
});
}
/**
* Create a test workspace with a library as the default project.
*/
async function createTestLibrary(runner, libOptions) {
const workspaceTree = await runner.runExternalSchematic('@schematics/angular', 'ng-new', {
directory: '/',
name: `${libOptions.projectName}-workspace`,
createApplication: false,
strict: true,
version: cli_1.VERSION.major,
...libOptions.options,
});
await runner.runExternalSchematic('@schematics/angular', 'library', {
name: libOptions.projectName,
}, workspaceTree);
// Create a "showcase" application for library projects.
await runner.runExternalSchematic('@schematics/angular', 'application', {
name: `${libOptions.projectName}-showcase`,
}, workspaceTree);
return workspaceTree;
}
//# sourceMappingURL=scaffold.js.map