{"id":23441832,"url":"https://github.com/ngxs/schematics","last_synced_at":"2025-04-07T12:06:19.548Z","repository":{"id":33161542,"uuid":"150078116","full_name":"ngxs/schematics","owner":"ngxs","description":":wrench: Schematics for @ngxs/store ","archived":false,"fork":false,"pushed_at":"2024-05-23T01:05:02.000Z","size":1031,"stargazers_count":82,"open_issues_count":13,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-23T02:24:44.985Z","etag":null,"topics":["angular","cli","ngxs","schematics","stage-2"],"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/ngxs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-09-24T09:10:45.000Z","updated_at":"2024-05-30T03:50:08.167Z","dependencies_parsed_at":"2024-01-11T01:35:24.812Z","dependency_job_id":"9cc9563b-93b5-4b35-a4ff-fc3970937281","html_url":"https://github.com/ngxs/schematics","commit_stats":{"total_commits":273,"total_committers":10,"mean_commits":27.3,"dds":0.5641025641025641,"last_synced_commit":"598859cf81341a959cf905842311c0367ef9e33e"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngxs%2Fschematics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngxs%2Fschematics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngxs%2Fschematics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngxs%2Fschematics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngxs","download_url":"https://codeload.github.com/ngxs/schematics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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","cli","ngxs","schematics","stage-2"],"created_at":"2024-12-23T17:18:53.213Z","updated_at":"2025-04-07T12:06:19.529Z","avatar_url":"https://github.com/ngxs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚠️ DEPRECATED ⚠️\n\n**Deprecated:** This package is no longer actively maintained.\n\n💡 We recommend using the schematics from the [ngxs/store](https://www.ngxs.io/introduction/schematics) package.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://habrastorage.org/webt/y2/m3/yt/y2m3ytqadzph9hos5taqwyp6axw.png\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eSchematics\u003c/h1\u003e\n  \u003cp align=\"center\"\u003eThis repository contains schematics for generating NGXS Store in Angular apps using the Angular CLI.\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://travis-ci.org/ngxs/schematics\"\u003e\n      \u003cimg src=\"https://travis-ci.org/ngxs/schematics.svg?branch=master\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://badge.fury.io/js/%40ngxs%2Fschematics\"\u003e\n      \u003cimg src=\"https://badge.fury.io/js/%40ngxs%2Fschematics.svg\"\u003e\n    \u003c/a\u003e \n    \u003ca href=\"https://github.com/ngxs/schematics/blob/master/LICENCE\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/License-MIT-green.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codeclimate.com/github/ngxs/schematics/maintainability\"\u003e\n      \u003cimg src=\"https://api.codeclimate.com/v1/badges/f5c522a094a9303cac05/maintainability\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codeclimate.com/github/ngxs/schematics/test_coverage\"\u003e\n      \u003cimg src=\"https://api.codeclimate.com/v1/badges/f5c522a094a9303cac05/test_coverage\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://greenkeeper.io/\"\u003e\n      \u003cimg src=\"https://badges.greenkeeper.io/ngxs/schematics.svg\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n  \n## Installation\n\n### Install Angular CLI\n\nYou should be using `@angular/cli@6.1.0` or newer.\n\n```bash\nnpm i -g @angular/cli\n```\n\n### Install NGXS Schematics\n```bash\nnpm i @ngxs/schematics\n```\n\n### Easy way to add NGXS Store in your application \n\nTo add NGXS Store in application, you can use `ng add` with `@ngxs/schematics`.\n\n```bash\nng add @ngxs/schematics\n```\n\n| Option | Description\n| --- | ---\n| --skipInstall | The flag to skip packages installing\n\nResult:\n\n```\nInstalled packages for tooling via npm.\n\n  Adding npm dependencies\n\n  ✅️ Added \"@ngxs/devtools-plugin\" into dependencies\n  ✅️ Added \"@ngxs/logger-plugin\" into dependencies\n  ✅️ Added \"@ngxs/store\" into dependencies\n  ✅️ Added \"@ngxs/schematics\" into devDependencies\n\n  Adding @ngxs/schematics to angular.json\n\n  UPDATE package.json (2920 bytes)\n  ✅️ Setting NGXS Schematics as default\n\n  👏 Create your first ngxs store by using starter kit: ng g ngxs-sk --spec\n\n  🔍 Installing packages...\n```\n\n## Usage\n\n### Generating Components\n\nYou can use the ng generate (or just ng g) command to generate ngxs components:\n\n```bash\nng generate @ngxs/schematics:store --name todo\nng g @ngxs/schematics:store --name todo\n```\n\nAll possible commands in the table below:\n\n| Scaffold | Usage | Aliases | Options\n| --- | --- | --- | ---\n| Store | ng g @ngxs/schematics:store | ngxs-store | --name (required), --path, --sourceRoot, --spec (boolean)\n| State | ng g @ngxs/schematics:state | ngxs-state | --name (required), --path, --sourceRoot, --spec (boolean)\n| Actions | ng g @ngxs/schematics:actions | ngxs-actions | --name (required), --path, --sourceRoot\n| Starter Kit | ng g @ngxs/schematics:starter-kit | ngxs-sk | --path, --sourceRoot, --spec (boolean)\n\n### Aliases\n\nFor used the aliases you need to set @ngxs/schematics as the default collection. Update your project's `angular.json`:\n\n```json\n\"cli\": {\n  \"defaultCollection\": \"@ngxs/schematics\"\n}\n```\n\nOr simply use `ng add @ngxs/schematics --skipInstall`\n\n### Options\n\n`--name` - there is a name of your store, state or actions \u003cbr /\u003e\n`--spec` - flag that allow to generate the test file \u003cbr /\u003e\n`--sourceRoot` - absolute path to create your files (in default - `src`) \u003cbr /\u003e\n`--path` - path relative to `--sourceRoot` (for example, `--path=app` -\u003e `/src/app`)\n\n\n## Examples\n\n### Create a NGXS Store\nTo generate store with `@ngxs/schematics`:\n\n```bash\nng generate @ngxs/schematics:store --name todo\n```\n\nResult:\n\n```ts\nCREATE src/todo/todo.actions.ts\nCREATE src/todo/todo.state.ts\n\n```\n\nOr with spec:\n\n```bash\nng generate @ngxs/schematics:store --name todo --spec\n```\n\nResult:\n\n```ts\nCREATE src/todo/todo.actions.ts\nCREATE src/todo/todo.state.spec.ts\nCREATE src/todo/todo.state.ts\n```\n\n### Create a NGXS State\nTo generate state with `@ngxs/schematics`:\n\n```bash\nng generate @ngxs/schematics:state --name todo\n```\n\nResult:\n\n```ts\nCREATE src/todo/todo.state.ts\n\n```\n\nOr with spec:\n\n```bash\nng generate @ngxs/schematics:state --name todo --spec\n```\n\nResult:\n\n```ts\nCREATE src/todo/todo.state.spec.ts\nCREATE src/todo/todo.state.ts\n```\n\n### Create a NGXS Actions\nTo generate state with `@ngxs/schematics`:\n\n```bash\nng generate @ngxs/schematics:actions --name todo\n```\n\nResult:\n\n```ts\nCREATE src/todo/todo.actions.ts\n\n```\n\n## NGXS Starter Kit\n\n### Usage\nTo generate store with `@ngxs/schematics:starter-kit`:\n\n```bash\nng generate @ngxs/schematics:starter-kit\n```\n\nResult:\n\n```ts\nCREATE src/store/store.config.ts\nCREATE src/store/store.module.ts\nCREATE src/store/auth/auth.actions.ts\nCREATE src/store/auth/auth.state.ts\nCREATE src/store/dashboard/index.ts\nCREATE src/store/dashboard/states/dictionary/dictionary.actions.ts\nCREATE src/store/dashboard/states/dictionary/dictionary.state.ts\nCREATE src/store/dashboard/states/user/user.actions.ts\nCREATE src/store/dashboard/states/user/user.state.ts\n```\n\nOr with spec:\n\n```bash\nng generate @ngxs/schematics:starter-kit --spec\n```\n\nResult:\n\n```ts\nCREATE src/store/store.config.ts\nCREATE src/store/store.module.ts\nCREATE src/store/auth/auth.actions.ts\nCREATE src/store/auth/auth.state.spec.ts\nCREATE src/store/auth/auth.state.ts\nCREATE src/store/dashboard/index.ts\nCREATE src/store/dashboard/states/dictionary/dictionary.actions.ts\nCREATE src/store/dashboard/states/dictionary/dictionary.state.spec.ts\nCREATE src/store/dashboard/states/dictionary/dictionary.state.ts\nCREATE src/store/dashboard/states/user/user.actions.ts\nCREATE src/store/dashboard/states/user/user.state.spec.ts\nCREATE src/store/dashboard/states/user/user.state.ts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngxs%2Fschematics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngxs%2Fschematics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngxs%2Fschematics/lists"}