# generator-angular-fullstack-crud

> Yeoman generator to add CRUD functionality to an angular-fullstack site

Latest version **0.0.3** (published 2014-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install generator-angular-fullstack-crud
pnpm add generator-angular-fullstack-crud
yarn add generator-angular-fullstack-crud
bun add generator-angular-fullstack-crud
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2014-09-22 |
| First published | 2014-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Marty Mavis |
| Maintainers | martyice |
| Keywords | yeoman-generator |

## Links

- npm: https://www.npmjs.com/package/generator-angular-fullstack-crud
- Repository: https://github.com/MartyIce/generator-angular-fullstack-crud
- Issues: https://github.com/MartyIce/generator-angular-fullstack-crud/issues
- npm.io page: https://npm.io/package/generator-angular-fullstack-crud

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ~0.4.0
- [yosay](https://npm.io/package/yosay.md) ^0.1.0
- [jquery](https://npm.io/package/jquery.md) ^2.1.1
- [yeoman-generator](https://npm.io/package/yeoman-generator.md) ~0.16.0

## Recent versions

- 0.0.3 (latest) — 2014-09-22
- 0.0.2 — 2014-08-29
- 0.0.1 — 2014-06-24

## README

# generator-angular-fullstack-crud [![Build Status](https://secure.travis-ci.org/MartyIce/generator-angular-fullstack-crud.png?branch=master)](https://travis-ci.org/MartyIce/generator-angular-fullstack-crud)

> [Yeoman](http://yeoman.io) generator


## Getting Started

### Install Yeoman

```bash
$ npm install -g yo
```

## Angular Fullstack CRUD

To install generator-angular-fullstack-crud from npm, run:

```bash
$ npm install -g generator-angular-fullstack-crud
```

Next, ensure you have a (mostly?) blank version of an angular-fullstack site.  For best results, execute the generator against a completely fresh/new angular-fullstack site.

This can be accomplished by creating a new directory, and generating:

```bash
$ yo angular-fullstack
```

Next, create a config.json file to drive the crud generation.  The angular-fullstack-crud generator comes with an example file, config.json.  The only update required within this example is to correctly set the 'appName' property to whateve your angular-fullstack application is named.  Here is an example of what this config might look like:

```json
{
    "clean": true,
    "appName": "SampleApp",
    "globalModel":
    {
        "name": "String",
        "creation_datetime": "Date"
    },
    "entities": [
        {
            "name": "reservation",
            "model": {
                "headcount": "Number",
                "reservation_datetime": "Date",
                "guest_id": "ManualReference"
            }
        },
        {
            "name": "table",
            "model": {
                "capacity": "Number"
            }
        },
        {
            "name": "server",
            "model": {
                "name": "String",
                "table": "MongooseReference:Table"
            }
        },
        {
            "name": "guest",
            "model": {
                "favorite_meal": "String"
            }
        }
    ]
}
```


Copy that into the root of your new angular-fullstack site, and run the following:

```bash
$ yo angular-fullstack-crud
```

Using the values found in the config file, the generator will add views, controllers, models, etc to add the configured CRUD objects to your application.  There are certain blocks of code that need to be injected into existing files (for example, the routes file).  There are two ways the angular-fullstack-crud generator can accomplish this:

* If being executed for the first time, it will look for certain code signatures in the newly generated angular-fullstack site, and inject there.  It will also leave "markers" that it uses for subsequent generation.

* If being executed again against a site, it will rely on the "markers" to know where to inject code.  The markers will look something like this:

```js
    // ROUTE INCLUDES BEGIN
    // ROUTE INCLUDES END
```

This process is a little fragile, and will work incorrectly if the existing angular-fullstack code looks differently than what the generator expects.  For best results, use the "marker" paradigm, and code will always be injected into the correct place.

## License

MIT

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