@ng-annotate/angular 0.3.8 → 0.3.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 +1 -1
- package/schematics/ng-add/index.js +19 -0
- package/schematics/ng-add/index.ts +23 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-annotate/angular",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"schematics": "./schematics/collection.json",
|
|
5
5
|
"description": "Angular library for ng-annotate-mcp — browser overlay for annotating components and routing instructions to an AI agent",
|
|
6
6
|
"keywords": [
|
|
@@ -259,6 +259,24 @@ function addDevDependency() {
|
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
+
function addGitignore() {
|
|
263
|
+
return (tree, context) => {
|
|
264
|
+
const entry = '.ng-annotate/';
|
|
265
|
+
const gitignorePath = '.gitignore';
|
|
266
|
+
if (!tree.exists(gitignorePath)) {
|
|
267
|
+
tree.create(gitignorePath, entry + '\n');
|
|
268
|
+
context.logger.info('✅ Created .gitignore with .ng-annotate/');
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
const content = tree.read(gitignorePath).toString('utf-8');
|
|
272
|
+
if (content.includes(entry)) {
|
|
273
|
+
context.logger.info('.ng-annotate/ already in .gitignore, skipping.');
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
tree.overwrite(gitignorePath, content.trimEnd() + '\n\n' + entry + '\n');
|
|
277
|
+
context.logger.info('✅ Added .ng-annotate/ to .gitignore');
|
|
278
|
+
};
|
|
279
|
+
}
|
|
262
280
|
function default_1(options) {
|
|
263
281
|
return (tree, context) => {
|
|
264
282
|
context.logger.info('Setting up @ng-annotate...');
|
|
@@ -268,6 +286,7 @@ function default_1(options) {
|
|
|
268
286
|
addVitePlugin(),
|
|
269
287
|
addProviders(),
|
|
270
288
|
addMcpConfig(options),
|
|
289
|
+
addGitignore(),
|
|
271
290
|
])(tree, context);
|
|
272
291
|
};
|
|
273
292
|
}
|
|
@@ -287,6 +287,28 @@ function addDevDependency(): Rule {
|
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
+
function addGitignore(): Rule {
|
|
291
|
+
return (tree: Tree, context: SchematicContext) => {
|
|
292
|
+
const entry = '.ng-annotate/';
|
|
293
|
+
const gitignorePath = '.gitignore';
|
|
294
|
+
|
|
295
|
+
if (!tree.exists(gitignorePath)) {
|
|
296
|
+
tree.create(gitignorePath, entry + '\n');
|
|
297
|
+
context.logger.info('✅ Created .gitignore with .ng-annotate/');
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
const content = tree.read(gitignorePath)!.toString('utf-8');
|
|
302
|
+
if (content.includes(entry)) {
|
|
303
|
+
context.logger.info('.ng-annotate/ already in .gitignore, skipping.');
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
tree.overwrite(gitignorePath, content.trimEnd() + '\n\n' + entry + '\n');
|
|
308
|
+
context.logger.info('✅ Added .ng-annotate/ to .gitignore');
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
|
|
290
312
|
export default function (options: Options): Rule {
|
|
291
313
|
return (tree: Tree, context: SchematicContext) => {
|
|
292
314
|
context.logger.info('Setting up @ng-annotate...');
|
|
@@ -296,6 +318,7 @@ export default function (options: Options): Rule {
|
|
|
296
318
|
addVitePlugin(),
|
|
297
319
|
addProviders(),
|
|
298
320
|
addMcpConfig(options),
|
|
321
|
+
addGitignore(),
|
|
299
322
|
])(tree, context);
|
|
300
323
|
};
|
|
301
324
|
}
|