Primeiro commit do projeto Angular
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"singleQuote": true,
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.html",
|
||||
"options": {
|
||||
"parser": "angular"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
# <%= utils.classify(name) %>
|
||||
|
||||
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version <%= version %>.
|
||||
|
||||
## Development server
|
||||
|
||||
To start a local development server, run:
|
||||
|
||||
```bash
|
||||
ng serve
|
||||
```
|
||||
|
||||
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
||||
|
||||
```bash
|
||||
ng generate component component-name
|
||||
```
|
||||
|
||||
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
||||
|
||||
```bash
|
||||
ng generate --help
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To build the project run:
|
||||
|
||||
```bash
|
||||
ng build
|
||||
```
|
||||
|
||||
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:
|
||||
|
||||
```bash
|
||||
ng test
|
||||
```
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
For end-to-end (e2e) testing, run:
|
||||
|
||||
```bash
|
||||
ng e2e
|
||||
```
|
||||
|
||||
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.ts]
|
||||
quote_type = single
|
||||
ij_typescript_use_double_quotes = false
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
|
||||
|
||||
# Compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
/bazel-out
|
||||
|
||||
# Node
|
||||
/node_modules
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# IDEs and editors
|
||||
.idea/
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/mcp.json
|
||||
.history/*
|
||||
|
||||
# Miscellaneous
|
||||
/.angular/cache
|
||||
.sass-cache/
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
testem.log
|
||||
/typings
|
||||
__screenshots__/
|
||||
|
||||
# System files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
Generated
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
|
||||
"recommendations": ["angular.ng-template"]
|
||||
}
|
||||
Generated
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "ng serve",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "npm: start",
|
||||
"url": "http://localhost:4200/"
|
||||
}<% if (!minimal) { %>,
|
||||
{
|
||||
"name": "ng test",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "npm: test",
|
||||
"url": "http://localhost:9876/debug.html"
|
||||
}<% } %>
|
||||
]
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
// For more information, visit: https://angular.dev/ai/mcp
|
||||
"servers": {
|
||||
"angular-cli": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@angular/cli", "mcp"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
{
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "start",
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"owner": "typescript",
|
||||
"pattern": "$tsc",
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": {
|
||||
"regexp": "Changes detected"
|
||||
},
|
||||
"endsPattern": {
|
||||
"regexp": "bundle generation (complete|failed)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}<% if (!minimal) { %>,
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "test",
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"owner": "typescript",
|
||||
"pattern": "$tsc",
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": {
|
||||
"regexp": "Changes detected"
|
||||
},
|
||||
"endsPattern": {
|
||||
"regexp": "bundle generation (complete|failed)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}<% } %>
|
||||
]
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,<% if (packageManager) { %>
|
||||
"cli": {
|
||||
"packageManager": "<%= packageManager %>"
|
||||
},<% } %>
|
||||
"newProjectRoot": "<%= newProjectRoot %>",
|
||||
"projects": {
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "<%= utils.dasherize(name) %>",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development"<% if (!minimal) { %>,
|
||||
"test": "ng test"<% } %>
|
||||
},
|
||||
"private": true,
|
||||
<% if (packageManagerWithVersion) { %>"packageManager": "<%= packageManagerWithVersion %>",<% } %>
|
||||
"dependencies": {
|
||||
"@angular/common": "<%= latestVersions.Angular %>",
|
||||
"@angular/compiler": "<%= latestVersions.Angular %>",
|
||||
"@angular/core": "<%= latestVersions.Angular %>",
|
||||
"@angular/forms": "<%= latestVersions.Angular %>",
|
||||
"@angular/platform-browser": "<%= latestVersions.Angular %>",
|
||||
"@angular/router": "<%= latestVersions.Angular %>",
|
||||
"rxjs": "<%= latestVersions['rxjs'] %>",
|
||||
"tslib": "<%= latestVersions['tslib'] %>"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/cli": "<%= '^' + version %>",
|
||||
"@angular/compiler-cli": "<%= latestVersions.Angular %>",
|
||||
"prettier": "<%= latestVersions['prettier'] %>",
|
||||
"typescript": "<%= latestVersions['typescript'] %>"
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
||||
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {<% if (strict) { %>
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,<% } %>
|
||||
"skipLibCheck": true,
|
||||
"isolatedModules": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"target": "ES2022",
|
||||
"module": "preserve"
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false<% if (strict) { %>,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true<% } %>
|
||||
},
|
||||
"files": []
|
||||
}
|
||||
+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 { Rule } from '@angular-devkit/schematics';
|
||||
import { Schema as WorkspaceOptions } from './schema';
|
||||
export default function (options: WorkspaceOptions): Rule;
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
"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 schematics_1 = require("@angular-devkit/schematics");
|
||||
const node_child_process_1 = require("node:child_process");
|
||||
const latest_versions_1 = require("../utility/latest-versions");
|
||||
function default_1(options) {
|
||||
return () => {
|
||||
const packageManager = options.packageManager;
|
||||
let packageManagerWithVersion;
|
||||
if (packageManager) {
|
||||
let packageManagerVersion;
|
||||
try {
|
||||
packageManagerVersion = (0, node_child_process_1.execSync)(`${packageManager} --version`, {
|
||||
encoding: 'utf8',
|
||||
stdio: 'pipe',
|
||||
env: {
|
||||
...process.env,
|
||||
// NPM updater notifier will prevents the child process from closing until it timeout after 3 minutes.
|
||||
NO_UPDATE_NOTIFIER: '1',
|
||||
NPM_CONFIG_UPDATE_NOTIFIER: 'false',
|
||||
},
|
||||
}).trim();
|
||||
}
|
||||
catch { }
|
||||
if (packageManagerVersion) {
|
||||
packageManagerWithVersion = `${packageManager}@${packageManagerVersion}`;
|
||||
}
|
||||
}
|
||||
return (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
||||
options.minimal ? (0, schematics_1.filter)((path) => !path.endsWith('editorconfig.template')) : (0, schematics_1.noop)(),
|
||||
(0, schematics_1.applyTemplates)({
|
||||
utils: schematics_1.strings,
|
||||
...options,
|
||||
'dot': '.',
|
||||
latestVersions: latest_versions_1.latestVersions,
|
||||
packageManagerWithVersion,
|
||||
}),
|
||||
]));
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAgBH,4BAsCC;AApDD,2DASoC;AACpC,2DAA8C;AAC9C,gEAA4D;AAG5D,mBAAyB,OAAyB;IAChD,OAAO,GAAG,EAAE;QACV,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;QAC9C,IAAI,yBAA6C,CAAC;QAElD,IAAI,cAAc,EAAE,CAAC;YACnB,IAAI,qBAAyC,CAAC;YAC9C,IAAI,CAAC;gBACH,qBAAqB,GAAG,IAAA,6BAAQ,EAAC,GAAG,cAAc,YAAY,EAAE;oBAC9D,QAAQ,EAAE,MAAM;oBAChB,KAAK,EAAE,MAAM;oBACb,GAAG,EAAE;wBACH,GAAG,OAAO,CAAC,GAAG;wBACd,uGAAuG;wBACvG,kBAAkB,EAAE,GAAG;wBACvB,0BAA0B,EAAE,OAAO;qBACpC;iBACF,CAAC,CAAC,IAAI,EAAE,CAAC;YACZ,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;YAEV,IAAI,qBAAqB,EAAE,CAAC;gBAC1B,yBAAyB,GAAG,GAAG,cAAc,IAAI,qBAAqB,EAAE,CAAC;YAC3E,CAAC;QACH,CAAC;QAED,OAAO,IAAA,sBAAS,EACd,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE;YACpB,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,mBAAM,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,iBAAI,GAAE;YACpF,IAAA,2BAAc,EAAC;gBACb,KAAK,EAAE,oBAAO;gBACd,GAAG,OAAO;gBACV,KAAK,EAAE,GAAG;gBACV,cAAc,EAAd,gCAAc;gBACd,yBAAyB;aAC1B,CAAC;SACH,CAAC,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Creates a new Angular workspace. A workspace provides a structured environment for
|
||||
* developing multiple projects, allowing you to manage dependencies, configurations, and
|
||||
* build processes for a collection of applications and libraries. This schematic sets up
|
||||
* the basic structure of the workspace and installs the necessary Angular dependencies.
|
||||
*/
|
||||
export type Schema = {
|
||||
/**
|
||||
* Create a workspace without any testing frameworks. This is intended for learning purposes
|
||||
* and simple experimentation, not for production applications.
|
||||
*/
|
||||
minimal?: boolean;
|
||||
/**
|
||||
* The name for the new workspace. This name will be used for the root directory and will be
|
||||
* referenced in various configuration files.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The path where new projects will be created within the workspace, relative to the
|
||||
* workspace root. By default, new projects are created in the `projects` directory.
|
||||
*/
|
||||
newProjectRoot?: string;
|
||||
/**
|
||||
* The package manager to use for installing dependencies.
|
||||
*/
|
||||
packageManager?: PackageManager;
|
||||
/**
|
||||
* Enable stricter type checking and bundle budget settings for projects created within the
|
||||
* workspace. This helps improve maintainability and catch bugs early on. For more
|
||||
* information, see https://angular.dev/tools/cli/template-typecheck#strict-mode
|
||||
*/
|
||||
strict?: boolean;
|
||||
/**
|
||||
* The version of the Angular CLI to use.
|
||||
*/
|
||||
version: string;
|
||||
};
|
||||
/**
|
||||
* The package manager to use for installing dependencies.
|
||||
*/
|
||||
export declare enum PackageManager {
|
||||
Bun = "bun",
|
||||
Npm = "npm",
|
||||
Pnpm = "pnpm",
|
||||
Yarn = "yarn"
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
"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 });
|
||||
exports.PackageManager = void 0;
|
||||
/**
|
||||
* The package manager to use for installing dependencies.
|
||||
*/
|
||||
var PackageManager;
|
||||
(function (PackageManager) {
|
||||
PackageManager["Bun"] = "bun";
|
||||
PackageManager["Npm"] = "npm";
|
||||
PackageManager["Pnpm"] = "pnpm";
|
||||
PackageManager["Yarn"] = "yarn";
|
||||
})(PackageManager || (exports.PackageManager = PackageManager = {}));
|
||||
//# sourceMappingURL=schema.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"schema.js","sourceRoot":"","sources":["schema.ts"],"names":[],"mappings":";AACA,mFAAmF;AACnF,oFAAoF;;;AAwCpF;;GAEG;AACH,IAAY,cAKX;AALD,WAAY,cAAc;IACtB,6BAAW,CAAA;IACX,6BAAW,CAAA;IACX,+BAAa,CAAA;IACb,+BAAa,CAAA;AACjB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "SchematicsAngularWorkspace",
|
||||
"title": "Angular Workspace Options Schema",
|
||||
"description": "Creates a new Angular workspace. A workspace provides a structured environment for developing multiple projects, allowing you to manage dependencies, configurations, and build processes for a collection of applications and libraries. This schematic sets up the basic structure of the workspace and installs the necessary Angular dependencies.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The name for the new workspace. This name will be used for the root directory and will be referenced in various configuration files.",
|
||||
"type": "string",
|
||||
"$default": {
|
||||
"$source": "argv",
|
||||
"index": 0
|
||||
}
|
||||
},
|
||||
"newProjectRoot": {
|
||||
"description": "The path where new projects will be created within the workspace, relative to the workspace root. By default, new projects are created in the `projects` directory.",
|
||||
"type": "string",
|
||||
"visible": "false"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "The version of the Angular CLI to use.",
|
||||
"visible": false,
|
||||
"$default": {
|
||||
"$source": "ng-cli-version"
|
||||
}
|
||||
},
|
||||
"minimal": {
|
||||
"description": "Create a workspace without any testing frameworks. This is intended for learning purposes and simple experimentation, not for production applications.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"strict": {
|
||||
"description": "Enable stricter type checking and bundle budget settings for projects created within the workspace. This helps improve maintainability and catch bugs early on. For more information, see https://angular.dev/tools/cli/template-typecheck#strict-mode",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"packageManager": {
|
||||
"description": "The package manager to use for installing dependencies.",
|
||||
"type": "string",
|
||||
"enum": ["npm", "yarn", "pnpm", "bun"],
|
||||
"$default": {
|
||||
"$source": "packageManager"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["name", "version"]
|
||||
}
|
||||
Reference in New Issue
Block a user