@filip.mazev/blocks 1.2.10 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocks/schematics/collection.json +10 -0
- package/blocks/schematics/ng-add/schema.json +44 -0
- package/fesm2022/filip.mazev-blocks-button.mjs +3 -3
- package/fesm2022/filip.mazev-blocks-core.mjs +12 -12
- package/fesm2022/filip.mazev-blocks-icons.mjs +3 -3
- package/fesm2022/filip.mazev-blocks-modal.mjs +33 -33
- package/fesm2022/filip.mazev-blocks-toastr.mjs +15 -15
- package/package.json +1 -1
- package/schematics/ng-add/index.d.ts +5 -0
- package/schematics/ng-add/index.js +3 -3
- package/schematics/tsconfig.json +0 -11
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngAdd = ngAdd;
|
|
4
|
-
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
4
|
function ngAdd(options) {
|
|
6
5
|
return (tree, context) => {
|
|
7
6
|
injectStyles(tree, context, options);
|
|
8
|
-
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
9
7
|
return tree;
|
|
10
8
|
};
|
|
11
9
|
}
|
|
12
10
|
function injectStyles(tree, context, options) {
|
|
11
|
+
var _a, _b;
|
|
13
12
|
const workspaceConfigPath = '/angular.json';
|
|
14
13
|
if (!tree.exists(workspaceConfigPath)) {
|
|
15
14
|
context.logger.warn('Could not find angular.json. Please configure the Blocks theme manually.');
|
|
@@ -25,7 +24,7 @@ function injectStyles(tree, context, options) {
|
|
|
25
24
|
context.logger.warn('Could not find a valid project in angular.json.');
|
|
26
25
|
return;
|
|
27
26
|
}
|
|
28
|
-
const buildOptions = project.architect
|
|
27
|
+
const buildOptions = (_b = (_a = project.architect) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.options;
|
|
29
28
|
if (!buildOptions || !buildOptions.styles) {
|
|
30
29
|
context.logger.warn(`Could not find styles configuration for project "${projectName}".`);
|
|
31
30
|
return;
|
|
@@ -43,6 +42,7 @@ function injectStyles(tree, context, options) {
|
|
|
43
42
|
return;
|
|
44
43
|
}
|
|
45
44
|
const content = tree.read(targetStylePath).toString('utf-8');
|
|
45
|
+
// Update the check to look for the new package namespace
|
|
46
46
|
if (content.includes('@filip.mazev/blocks')) {
|
|
47
47
|
context.logger.info('Blocks SCSS configuration already exists. Skipping style injection.');
|
|
48
48
|
return;
|