# ngxs-schematics

> NGXS schematics for Angular

Latest version **1.0.7** (published 2018-10-26) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ngxs-schematics
pnpm add ngxs-schematics
yarn add ngxs-schematics
bun add ngxs-schematics
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2018-10-26 |
| First published | 2018-10-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 54.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kirill Yusupov |
| Maintainers | kyusupov |
| Keywords | schematics, ngxs, cli, angular |

## Links

- npm: https://www.npmjs.com/package/ngxs-schematics
- Homepage: https://github.com/ngxs/schematics#readme
- Issues: https://github.com/ngxs/schematics/issues
- npm.io page: https://npm.io/package/ngxs-schematics

## Dependencies (3)

- [typescript](https://npm.io/package/typescript.md) ^2.9.2
- [@angular-devkit/core](https://npm.io/package/@angular-devkit/core.md) ^0.8.5
- [@angular-devkit/schematics](https://npm.io/package/@angular-devkit/schematics.md) ^0.8.5

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.7 (latest) — 2018-10-26
- 1.0.6 — 2018-10-26
- 1.0.5 — 2018-10-26
- 1.0.4 — 2018-10-26
- 1.0.3 — 2018-10-26
- 1.0.2 — 2018-10-25
- 1.0.1 — 2018-10-25
- 1.0.0 — 2018-10-25
- 0.1.2 — 2018-10-25
- 0.1.1 — 2018-10-25
- 0.1.0 — 2018-10-25
- 0.0.9 — 2018-10-25
- 0.0.8 — 2018-10-25
- 0.0.7 — 2018-10-25
- 0.0.6 — 2018-10-24
- … 5 more at https://npm.io/package/ngxs-schematics/versions

## README

<p align="center">
  <img src="https://habrastorage.org/webt/y2/m3/yt/y2m3ytqadzph9hos5taqwyp6axw.png" />
</p>
<h1 align="center">Schematics</h1>
<p align="center">This repository contains schematics for generating NGXS Store in Angular apps using the Angular CLI.</p>
<p align="center">
<a href="https://travis-ci.org/ngxs/schematics"><img src="https://travis-ci.org/ngxs/schematics.svg?branch=master" /></a>
<a href="https://github.com/ngxs/schematics/blob/master/LICENCE"><img src="https://img.shields.io/badge/License-MIT-green.svg" /></a>
<a href="https://codeclimate.com/github/ngxs/schematics/maintainability"><img src="https://api.codeclimate.com/v1/badges/f5c522a094a9303cac05/maintainability" /></a>
<a href="https://codeclimate.com/github/ngxs/schematics/test_coverage"><img src="https://api.codeclimate.com/v1/badges/f5c522a094a9303cac05/test_coverage" /></a>
<a href="https://now-examples-slackin-eqzjxuxoem.now.sh/"><img src="https://now-examples-slackin-eqzjxuxoem.now.sh/badge.svg"></a>
</p>
  
## Installation

### Install Angular CLI

You should be using `@angular/cli@6.1.0` or newer.

```bash
npm i -g @angular/cli
```

### Install NGXS Schematics
```bash
npm i -g @ngxs/schematics
```

## Usage

### Creating a new project
To generate new Angular project with NGXS Store, you can use `ng new` with `@ngxs/schematics` specified as the schematics collection.

```bash
ng new --collection=@ngxs/schematics my-app
```

### Create a NGXS Store
To generate store with `@ngxs/schematics`:

```bash
ng generate @ngxs/schematics:store --name todo
```

Result:

```ts
CREATE src/todo/todo.actions.ts
CREATE src/todo/todo.state.ts

```

Or with spec:

```bash
ng generate @ngxs/schematics:store --name todo --spec
```

Result:

```ts
CREATE src/todo/todo.actions.ts
CREATE src/todo/todo.state.spec.ts
CREATE src/todo/todo.state.ts
```

### Create a NGXS State
To generate state with `@ngxs/schematics`:

```bash
ng generate @ngxs/schematics:state --name todo
```

Result:

```ts
CREATE src/todo/todo.state.ts

```

Or with spec:

```bash
ng generate @ngxs/schematics:state --name todo --spec
```

Result:

```ts
CREATE src/todo/todo.state.spec.ts
CREATE src/todo/todo.state.ts
```

### Create a NGXS Actions
To generate state with `@ngxs/schematics`:

```bash
ng generate @ngxs/schematics:actions --name todo
```

Result:

```ts
CREATE src/todo/todo.actions.ts

```

## NGXS Starter Kit

### Usage
To generate store with `@ngxs/schematics:starter-kit`:

```bash
ng generate @ngxs/schematics:starter-kit
```

Result:

```ts
CREATE src/store/store.config.ts
CREATE src/store/store.module.ts
CREATE src/store/auth/auth.actions.ts
CREATE src/store/auth/auth.state.ts
CREATE src/store/auth/model/auth.model.ts
CREATE src/store/dashboard/index.ts
CREATE src/store/dashboard/states/dictionary/dictionary.actions.ts
CREATE src/store/dashboard/states/dictionary/dictionary.state.ts
CREATE src/store/dashboard/states/dictionary/model/dictionary-response.model.ts
CREATE src/store/dashboard/states/user/user.actions.ts
CREATE src/store/dashboard/states/user/user.state.ts
CREATE src/store/dashboard/states/user/model/person.model.ts
```

Or with spec:

```bash
ng generate @ngxs/schematics:starter-kit --spec
```

Result:

```ts
CREATE src/store/store.config.ts
CREATE src/store/store.module.ts
CREATE src/store/auth/auth.actions.ts
CREATE src/store/auth/auth.state.spec.ts
CREATE src/store/auth/auth.state.ts
CREATE src/store/auth/model/auth.model.ts
CREATE src/store/dashboard/index.ts
CREATE src/store/dashboard/states/dictionary/dictionary.actions.ts
CREATE src/store/dashboard/states/dictionary/dictionary.state.spec.ts
CREATE src/store/dashboard/states/dictionary/dictionary.state.ts
CREATE src/store/dashboard/states/dictionary/model/dictionary-response.model.ts
CREATE src/store/dashboard/states/user/user.actions.ts
CREATE src/store/dashboard/states/user/user.state.spec.ts
CREATE src/store/dashboard/states/user/user.state.ts
CREATE src/store/dashboard/states/user/model/person.model.ts
```

---
_Source: https://npm.io/package/ngxs-schematics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
