Primeiro commit do projeto Angular
This commit is contained in:
Generated
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
export enum <%= classify(name) %> {
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
import type { Rule } from '@angular-devkit/schematics';
|
||||
import type { Schema as EnumOptions } from './schema';
|
||||
export default function (options: EnumOptions): Rule;
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
"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 generate_from_files_1 = require("../utility/generate-from-files");
|
||||
function default_1(options) {
|
||||
return (0, generate_from_files_1.generateFromFiles)(options);
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAMH,4BAEC;AALD,wEAAmE;AAGnE,mBAAyB,OAAoB;IAC3C,OAAO,IAAA,uCAAiB,EAAC,OAAO,CAAC,CAAC;AACpC,CAAC"}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Creates a new enum in your project. Enums (enumerations) are a way to define a set of
|
||||
* named constants, making your code more readable and maintainable. This schematic
|
||||
* generates a new enum with the specified name and type.
|
||||
*/
|
||||
export type Schema = {
|
||||
/**
|
||||
* The name for the new enum. This will be used to create the enum file (e.g.,
|
||||
* `my-enum.enum.ts`).
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The path where the enum file should be created, relative to the current workspace. If not
|
||||
* specified, the enum will be created in the current directory.
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* The name of the project where the enum should be created. If not specified, the CLI will
|
||||
* determine the project from the current directory.
|
||||
*/
|
||||
project: string;
|
||||
/**
|
||||
* Adds a custom type to the filename, allowing you to create more descriptive enum names.
|
||||
* For example, if you set the type to `status`, the filename will be `my-enum.status.ts`.
|
||||
*/
|
||||
type?: string;
|
||||
};
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
|
||||
// CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=schema.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"schema.js","sourceRoot":"","sources":["schema.ts"],"names":[],"mappings":";AACA,mFAAmF;AACnF,oFAAoF"}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "SchematicsAngularEnum",
|
||||
"title": "Angular Enum Options Schema",
|
||||
"type": "object",
|
||||
"description": "Creates a new enum in your project. Enums (enumerations) are a way to define a set of named constants, making your code more readable and maintainable. This schematic generates a new enum with the specified name and type.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name for the new enum. This will be used to create the enum file (e.g., `my-enum.enum.ts`).",
|
||||
"$default": {
|
||||
"$source": "argv",
|
||||
"index": 0
|
||||
},
|
||||
"x-prompt": "What name would you like to use for the enum?"
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"format": "path",
|
||||
"$default": {
|
||||
"$source": "workingDirectory"
|
||||
},
|
||||
"description": "The path where the enum file should be created, relative to the current workspace. If not specified, the enum will be created in the current directory.",
|
||||
"visible": false
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "The name of the project where the enum should be created. If not specified, the CLI will determine the project from the current directory.",
|
||||
"$default": {
|
||||
"$source": "projectName"
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Adds a custom type to the filename, allowing you to create more descriptive enum names. For example, if you set the type to `status`, the filename will be `my-enum.status.ts`."
|
||||
}
|
||||
},
|
||||
"required": ["name", "project"]
|
||||
}
|
||||
Reference in New Issue
Block a user