1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.getProjectStyleFile = exports.getDependencies = void 0;
|
4 | const core_1 = require("@angular-devkit/core");
|
5 | const currentVersions = require("./current_dependency_versions.json");
|
6 | const NGX_BOOTSTRAP_VERSION = currentVersions.NGX_BOOTSTRAP_VERSION;
|
7 | const BOOTSTRAP_VERSION = currentVersions.BOOTSTRAP_VERSION;
|
8 |
|
9 | const defaultStyleFileRegex = /styles\.(c|le|sc|sa)ss/;
|
10 |
|
11 | const validStyleFileRegex = /\.(c|le|sc|sa)ss/;
|
12 | function getDependencies(host) {
|
13 | return [
|
14 | { name: 'bootstrap', version: BOOTSTRAP_VERSION },
|
15 | { name: 'ngx-bootstrap', version: NGX_BOOTSTRAP_VERSION }
|
16 | ];
|
17 | }
|
18 | exports.getDependencies = getDependencies;
|
19 | function getProjectStyleFile(existingStyles, extension) {
|
20 | const defaultExtension = existingStyles.find((file) => extension ? file === `styles.${extension}` : defaultStyleFileRegex.test(file));
|
21 | if (defaultExtension) {
|
22 | return defaultExtension;
|
23 | }
|
24 | ;
|
25 | const fallbackStylePath = existingStyles.find((file) => extension ? file === null || file === void 0 ? void 0 : file.endsWith(`.${extension}`) : validStyleFileRegex.test(file));
|
26 | if (fallbackStylePath) {
|
27 | return core_1.normalize(fallbackStylePath);
|
28 | }
|
29 | ;
|
30 | }
|
31 | exports.getProjectStyleFile = getProjectStyleFile;
|
32 |
|
\ | No newline at end of file |