{"id":15674420,"url":"https://github.com/sinedied/ng-lite-starter","last_synced_at":"2025-05-06T23:08:28.316Z","repository":{"id":50346336,"uuid":"513169355","full_name":"sinedied/ng-lite-starter","owner":"sinedied","description":"Minimal starter for Angular projects","archived":false,"fork":false,"pushed_at":"2023-04-07T07:46:10.000Z","size":420,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-06T23:08:16.264Z","etag":null,"topics":["angular","minimal","starter","template"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinedied.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-12T14:12:21.000Z","updated_at":"2023-03-28T00:34:47.000Z","dependencies_parsed_at":"2024-10-23T12:03:21.387Z","dependency_job_id":null,"html_url":"https://github.com/sinedied/ng-lite-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinedied%2Fng-lite-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinedied%2Fng-lite-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinedied%2Fng-lite-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinedied%2Fng-lite-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinedied","download_url":"https://codeload.github.com/sinedied/ng-lite-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782784,"owners_count":21803408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","minimal","starter","template"],"created_at":"2024-10-03T15:44:27.093Z","updated_at":"2025-05-06T23:08:28.296Z","avatar_url":"https://github.com/sinedied.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🪶 ng-lite starter\n\n\u003e Minimal starter for Angular projects.\n\nSee this [dev.to article](https://dev.to/angular/a-simpler-and-smaller-angular-starter-with-nglite-1ooh) to learn how this starter was created and for more details about the differences with Angular CLI's default `ng new`.\n\n*Note: the article was written based on Angular 14, and this starter has been updated since so you can expect a few differences since Angular 15 base starter simplified a few things already.* 🙂\n\n## Usage\n\nTo create a new project from this starter, you can either:\n\n- Run `npx degit sinedied/ng-lite-starter \u003cproject-name\u003e`\n- Or select **Use this template** button at the top of this repository and follow the instructions.\n\n## Tasks\n\nThis starter works the same way as any Angular project, by using either the included NPM scripts or the Angular CLI directly:\n\n- `ng serve`: run dev server at `http://localhost:4200/`\n- `ng build`: build the project in the `dist/` directory.\n- `ng generate component component-name`: generates a new component.\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.\n\n## Add unit testing\n\nYou can add unit testing to your project using the [Jest](https://jestjs.io) testing framework by following these steps:\n\n1. Run `npm install --save-dev jest @angular-builders/jest @types/jest`\n2. Add a `jest.config.js` file to your project root with the following content:\n  ```js\n  module.exports = {\n    clearMocks: true,\n    collectCoverage: true,\n    coverageDirectory: \"coverage\",\n  };\n  ```\n3. Add a `tsconfig.spec.json` file to your project root with the following content:\n  ```json\n  {\n    \"extends\": \"./tsconfig.json\",\n    \"compilerOptions\": {\n      \"outDir\": \"./out-tsc/spec\",\n      \"types\": [\"jest\"],\n      \"esModuleInterop\": true\n    },\n    \"include\": [\n      \"src/**/*.spec.ts\",\n      \"src/**/*.d.ts\"\n    ]\n  }\n  ```\n4. In your `angular.json` file, add this after your `serve` configuration (under the `architect` key):\n  ```json\n  \"test\": {\n    \"builder\": \"@angular-builders/jest:run\",\n    \"options\": {\n      \"tsConfig\": \"tsconfig.spec.json\"\n    }\n  },\n  ```\n  If you want to have tests generated by default when using the `ng generate` command, you can also remove all the `\"skipTests\": true` occurences in this file.\n5. Create your first test in `src/app/app.component.spec.ts`:\n  ```typescript\n  import { ComponentFixture, TestBed } from '@angular/core/testing';\n  import { AppComponent } from './app.component';\n\n  describe('AppComponent', () =\u003e {\n    let component: AppComponent;\n    let fixture: ComponentFixture\u003cAppComponent\u003e;\n\n    beforeEach(async () =\u003e {\n      await TestBed.configureTestingModule({\n        imports: [AppComponent],\n      }).compileComponents();\n\n      fixture = TestBed.createComponent(AppComponent);\n      component = fixture.componentInstance;\n      fixture.detectChanges();\n    });\n\n    it('should create the component', () =\u003e {\n      expect(component).toBeTruthy();\n    });\n  });\n  ```\n\nYou can now run your tests with `ng test` or `ng test --watch`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinedied%2Fng-lite-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinedied%2Fng-lite-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinedied%2Fng-lite-starter/lists"}