@tmdjr/ngx-editor-js2 20.0.8 → 20.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmdjr/ngx-editor-js2",
3
- "version": "20.0.8",
3
+ "version": "20.0.9",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "peerDependencies": {
6
6
  "@angular/animations": "^20.0.4",
@@ -62,6 +62,7 @@ const optionalBlocks = {
62
62
  };
63
63
  function ngAdd(options) {
64
64
  return (tree, context) => __awaiter(this, void 0, void 0, function* () {
65
+ const rules = [];
65
66
  const blocks = options.blocks || [];
66
67
  blocks.forEach((block) => {
67
68
  const { package: pkg, peers } = optionalBlocks[block];
@@ -90,15 +91,13 @@ function ngAdd(options) {
90
91
  updateAppConfig(tree, blocks, context, sourceRoot);
91
92
  addCodeMirrorSetup(tree, blocks, context, sourceRoot);
92
93
  if (options.demo) {
93
- // Add demo files
94
- context.logger.info('✨ Adding demo AppComponent...');
95
- (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files/demo'), [
96
- (0, schematics_1.applyTemplates)({}), // you can pass vars here if you want
97
- (0, schematics_1.move)('src/app'), // adjust this path if needed
98
- ]))(tree, context);
94
+ rules.push((0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files/demo'), [
95
+ (0, schematics_1.applyTemplates)({}), // Pass in vars if you want
96
+ (0, schematics_1.move)('src/app'),
97
+ ])));
99
98
  }
100
99
  context.logger.info('✅ Installation setup complete.');
101
- return tree;
100
+ return (0, schematics_1.chain)(rules);
102
101
  });
103
102
  }
104
103
  function updateStylesScss(tree, blocks, context, sourceRoot) {
@@ -1,4 +1,14 @@
1
- import { apply, applyTemplates, mergeWith, move, Rule, SchematicContext, Tree, url } from '@angular-devkit/schematics';
1
+ import {
2
+ apply,
3
+ applyTemplates,
4
+ mergeWith,
5
+ move,
6
+ Rule,
7
+ chain,
8
+ SchematicContext,
9
+ Tree,
10
+ url,
11
+ } from '@angular-devkit/schematics';
2
12
  import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
3
13
  import {
4
14
  addPackageJsonDependency,
@@ -63,6 +73,7 @@ const optionalBlocks: Record<
63
73
 
64
74
  export function ngAdd(options: any): Rule {
65
75
  return async (tree: Tree, context: SchematicContext) => {
76
+ const rules: Rule[] = [];
66
77
  const blocks: string[] = options.blocks || [];
67
78
 
68
79
  blocks.forEach((block) => {
@@ -95,18 +106,18 @@ export function ngAdd(options: any): Rule {
95
106
  addCodeMirrorSetup(tree, blocks, context, sourceRoot);
96
107
 
97
108
  if (options.demo) {
98
- // Add demo files
99
- context.logger.info('✨ Adding demo AppComponent...');
100
- mergeWith(
101
- apply(url('./files/demo'), [
102
- applyTemplates({}), // you can pass vars here if you want
103
- move('src/app'), // adjust this path if needed
104
- ])
105
- )(tree, context);
109
+ rules.push(
110
+ mergeWith(
111
+ apply(url('./files/demo'), [
112
+ applyTemplates({}), // Pass in vars if you want
113
+ move('src/app'),
114
+ ])
115
+ )
116
+ );
106
117
  }
107
118
 
108
119
  context.logger.info('✅ Installation setup complete.');
109
- return tree;
120
+ return chain(rules);
110
121
  };
111
122
  }
112
123