Angular Template Project ๐ŸŒŸ

License: Commercial
TypeScript
Angular
๐Ÿงน Remove Stale Unmerged Branches
๐Ÿš€ Dependency Update and Vulnerability Scan
CI

A starter template for Angular projects with ESLint, Prettier, and custom scripts. This template is designed to help you kickstart your Angular applications with the latest configurations and best practices. ๐Ÿš€

Features โœจ

  • Angular: Latest version of Angular for building modern web applications.
  • ESLint: Integrated ESLint for code linting and maintaining code quality.
  • Prettier: Code formatting with Prettier to ensure consistent code style.
  • TypeScript: Strongly typed JavaScript for better development experience.
  • Karma & Jasmine: Testing setup with Karma and Jasmine for unit testing.

Getting Started ๐Ÿ› ๏ธ

Prerequisites

  • Node.js (v23.1.0 or higher)
  • npm (v10.9.0 or higher)

Installation

Clone the repository:

git clone https://github.com/Jagoda11/angular-template.git
cd angular-template

Install dependencies:

npm install

Running the Development Server
To start the development server, run:

  npm start

This will start the Angular development server and you can view your application at http://localhost:4200.

Building the Project
To build the project,run:

  npm run build

This will create a production build of your application in the dist/ directory.

Running Tests
To run the tests, use:

  npm test

This will execute the unit tests using Karma and Jasmine.

Linting the Code
To lint the code, run:

  npm run lint

This will run ESLint on your project to check for code quality issues.

Formatting the Code
To format the code using Prettier, run:

  npm run format

This will format your code according to the Prettier configuration.

Cleaning Up
To clean up the project (remove node_modules, dist, and package-lock.json), run:

  npm run clean

Generating Test Files
To generate missing test files, run:

npm run generate-tests

This will create test files for your Angular components, services, application configs, and other exports that do not already have corresponding test files. The generated test files will include appropriate test cases for exported members, lifecycle hooks, and other relevant aspects.

๐Ÿ“œ Scripts

Here are the available scripts in this project:

  • start ๐Ÿš€: Starts the development server
    npm run start

  • build ๐Ÿ—๏ธ: Builds the project for production
    npm run build

  • watch ๐Ÿ‘€: Rebuilds the project on file changes
    npm run watch

  • test ๐Ÿงช: Runs tests for the project
    npm run test

  • lint ๐Ÿ”: Lints the project files using ESLint
    npm run lint

  • lint-fix ๐Ÿ”ง: Lints and fixes issues in the codebase
    npm run lint-fix

  • format โœจ: Formats the codebase using Prettier
    npm run format

  • clean ๐Ÿงฝ: Cleans up node_modules, dist, and package-lock.json
    npm run clean

  • lint-staged ๐Ÿ“: Runs lint-staged to check and format only staged files
    npm run lint-staged

  • generate-tests ๐Ÿ“: Runs generate-tests to create test files and basic tests
    npm run generate-tests

    ๐Ÿ›ก๏ธ Pre-commit Hooks

This template uses Husky to run lint-staged and tests automatically before each commit. This ensures all code meets quality standards and passes tests before merging into the main codebase.

โš™๏ธ Workflows

This project includes several GitHub Actions workflows to automate various tasks and maintain the project efficiently:

  • ๐Ÿ”„ npm-upgrade.yml: Automatically checks for and suggests upgrades to npm dependencies.
  • ๐Ÿ”’ close-stale-issues-and-prs.yml: Closes stale issues and pull requests that have had no recent activity, helping keep the issue tracker organized.
  • ๐Ÿท๏ธ label-new-pull-requests.yml: Automatically labels new pull requests to streamline tracking and review processes.
  • ๐Ÿ™ thank-contributors-on-issue-close.yml: Sends a thank-you message to contributors when an issue is closed, recognizing their support.
  • ๐Ÿ‘‹ welcome-new-pull-requests.yml: Welcomes new contributors by commenting on their first pull request.
  • ๐Ÿš€ ci.yml: Runs continuous tests on each commit to ensure code quality.
  • ๐Ÿ‘‹ welcome.yml: Greets new contributors when they create their first issue.
  • ๐Ÿ”’ close-merged-pull-requests.yml: Closes pull requests automatically when they are merged, keeping the PR list clean.
  • ๐Ÿ—‘๏ธ remove-merged-branches.yml: Deletes branches automatically after they are merged, helping to keep the repository tidy.
  • ๐Ÿ—‘๏ธ remove-stale-unmerged-branches.yml: Removes branches that have been inactive and remain unmerged, maintaining a clean repository.

Contributing ๐Ÿค

Contributions are welcome! Please open an issue or submit a pull request.

This project is licensed under the terms of the Commercial License Agreement. For more details, see the LICENSE file.
ยฉ 2024 Jagoda11

results matching ""

    No results matching ""