# generator-an2

> A generator for creating and scafolding AngularJS 2 basic application

Latest version **1.0.2** (published 2015-11-03) · BSD license · 0 weekly downloads

## Install

```sh
npm install generator-an2
pnpm add generator-an2
yarn add generator-an2
bun add generator-an2
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-11-03 |
| First published | 2015-11-03 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Houssem Yahiaoui |
| Maintainers | h_codex |
| Keywords | ES6, TypeScript, AngularJS, 2 |

## Links

- npm: https://www.npmjs.com/package/generator-an2
- npm.io page: https://npm.io/package/generator-an2

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^1.1.1
- [yosay](https://npm.io/package/yosay.md) ^1.0.5
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^0.26.0
- [username](https://npm.io/package/username.md) ^1.0.1
- [yeoman-generator](https://npm.io/package/yeoman-generator.md) ^0.21.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2015-11-03

## README

# AngularJS 2 Generator

![ngloveyo](http://s9.postimg.org/uc74e7qzz/ngloveyo.jpg)


AngualarJS 2.0 knew a tramadic changes over the pat nonths and for that matter, new concept have been introduced
and one of them is the Component.

And so we have the normal way and it's by creating the file it self and make the needed addiction and configure everything with your app and then you install a live server that let you Launch your application
i don't know about you but this process is really teades for me personally.So and because of that i've created AN2 Generator.

## Usage :

In order to have a full complete vision please check out this article.

[AN2 - Starter Article](https://medium.com/@houssemyahiaoui/angularjs-2-yeoman-generator-an2-ff7f705b3f80)

Or just follow the steps bellow :

1 - Install `Yo` , `Bower` , `Grunt-Cli` and for our case we will use `Gulp` you will find a development version bundled with 
the end result but yu ned to instal it in your development machine : 

``` 
 $ npm install -g bower  grunt-cli  gulp  yo
```

2 - Make yourself a working directory where you will scaffold your application, in direct or through command-line :

```
 $ mkdir dev-code 
```

3 - Simply Run the following command:

```
 $ yo an2
```

### Notice :

In this version of the app we will assume that you will work using `TypeScript`that's why all the generated fiels will be in `TypeScript`

```
import {Component} from 'angular2/angular2';

@Component({
  selector : 'my-app',
  template : '<span>Hello world !</span>',
})

export class componentName {
  public hello : string = 'Hello !';
}
```

# Sub-Generator :

For this matter we introduced the `cmp` sub generator, thi last will be responsible of creating the 3 different kind of files : 
`.ts` & `.html` & `.css`, and all that will be in a supported naming convention for th overall file name : `componentName.Component.ts/html/css` or just a plane naming `componentName.ts\html\css`.
Using this command :

```
$ yo an2:cmp hero 
```

Where :

1 - an2 : is the name of the generator.

2 - cmp : is yeoman way to launh the sub generator, and in our case it's called : `cmp` and the `:` is critical.

## Launching the Application :

AN2 Generator comes with pre-configuration files and we use `live-server` and the `tsc` the TypeScript compiler and it will run using the following commands 

```
$ npm start #In order to launch the Liver-Server module.
```

And :

```
$ npm run tsc #In order to launch the TypeScript Compiler.
```


## Changelog

Recent changes can be viewed on Github on the [Releases Page](https://github.com/yeoman/generator-angular/releases)

## License

[BSD license](http://opensource.org/licenses/bsd-license.php)

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