mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.7 KiB
36 lines
1.7 KiB
"use strict";
|
|
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.default = default_1;
|
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
const schematics_2 = require("@angular/cdk/schematics");
|
|
const utility_1 = require("@schematics/angular/utility");
|
|
const workspace_models_1 = require("@schematics/angular/utility/workspace-models");
|
|
const material_fonts_1 = require("./fonts/material-fonts");
|
|
const theming_1 = require("./theming/theming");
|
|
/**
|
|
* Scaffolds the basics of a Angular Material application, this includes:
|
|
* - Add Packages to package.json
|
|
* - Adds pre-built themes to styles.ext
|
|
*/
|
|
function default_1(options) {
|
|
return async (host, context) => {
|
|
const workspace = await (0, utility_1.readWorkspace)(host);
|
|
const project = (0, schematics_2.getProjectFromWorkspace)(workspace, options.project);
|
|
if (project.extensions['projectType'] === workspace_models_1.ProjectType.Application) {
|
|
return (0, schematics_1.chain)([(0, theming_1.addThemeToAppStyles)(options), (0, material_fonts_1.addFontsToIndex)(options)]);
|
|
}
|
|
context.logger.warn('Angular Material has been set up in your workspace. There is no additional setup ' +
|
|
'required for consuming Angular Material in your library project.\n\n' +
|
|
'If you intended to run the schematic on a different project, pass the `--project` ' +
|
|
'option.');
|
|
return;
|
|
};
|
|
}
|
|
//# sourceMappingURL=setup-project.js.map
|