# angular2-rollup-starter

> Angular2 Starter based on Rollup

Latest version **4.1.0** (published 2016-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular2-rollup-starter
pnpm add angular2-rollup-starter
yarn add angular2-rollup-starter
bun add angular2-rollup-starter
```

## 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 | 4.1.0 |
| Published | 2016-11-18 |
| First published | 2016-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 15 |
| Known vulnerabilities | 0 (+35 in 5 direct dependencies) |
| Install scripts | no |
| GitHub stars | 32 |
| Author | Jan Kuri |
| Maintainers | jkuri |
| Keywords | Angular2, ng2, rollup, rollupjs, browser-sync |

## Links

- npm: https://www.npmjs.com/package/angular2-rollup-starter
- Repository: https://github.com/jkuri/angular2-rollup-starter
- Homepage: https://github.com/jkuri/angular2-rollup-starter#readme
- Issues: https://github.com/jkuri/angular2-rollup-starter/issues
- npm.io page: https://npm.io/package/angular2-rollup-starter

## Dependencies (15)

- [rxjs](https://npm.io/package/rxjs.md) 5.0.0-beta.12
- [core-js](https://npm.io/package/core-js.md) 2.4.1
- [zone.js](https://npm.io/package/zone.js.md) 0.6.26
- [@angular/core](https://npm.io/package/@angular/core.md) 2.2.1
- [@angular/http](https://npm.io/package/@angular/http.md) 2.2.1
- [@angular/forms](https://npm.io/package/@angular/forms.md) 2.2.1
- [@angular/common](https://npm.io/package/@angular/common.md) 2.2.1
- [@angular/router](https://npm.io/package/@angular/router.md) 3.2.1
- [@angular/compiler](https://npm.io/package/@angular/compiler.md) 2.2.1
- [ng2-platform-node](https://npm.io/package/ng2-platform-node.md) 0.0.5
- [angular2-universal](https://npm.io/package/angular2-universal.md) 2.1.0-rc.1
- [@angular/compiler-cli](https://npm.io/package/@angular/compiler-cli.md) 2.2.1
- [@angular/platform-server](https://npm.io/package/@angular/platform-server.md) 2.2.1
- [@angular/platform-browser](https://npm.io/package/@angular/platform-browser.md) 2.2.1
- [@angular/platform-browser-dynamic](https://npm.io/package/@angular/platform-browser-dynamic.md) 2.2.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 4.1.0 (latest) — 2016-11-18
- 4.0.0 — 2016-11-01
- 3.1.0 — 2016-11-01

## README

# Angular2 Rollup Seed

[![Build Status](https://travis-ci.org/jkuri/angular2-rollup-starter.svg?branch=master)](https://travis-ci.org/jkuri/angular2-rollup-starter)

Angular2 starter seed based on Rollup.
Production builds including AoT steps. 
Starter also comes with Universal support built-in. 

## Start

First, clone this repository.

```sh
git clone https://github.com/jkuri/angular2-rollup-starter.git
```

Move into cloned directory and run 

```sh
npm install
```

## Usage

### Serve

```sh
npm run serve
```

***Note*** Initial load takes some time so vendor files are generated. 
Then it runs like a charm with cached builds which happens to be really fast.

This serves your app with live-reload enabled.

### Production Build

Production builds automatically includes AoT (Ahead of Time) compilation steps. 

```sh
npm run roll
```

### Universal (Isomorphic) Production Build

```sh
npm run roll:prerender
```

Routes stored in `config.json` as `universalRoutes` will be prerendered into `dist/` directory.
For example
```json
{
  "externalPackages": { },
  "styles": ["css/app.css"],
  "universalRoutes": ["/", "/docs", "/docs/child"]
}
```

will generate prerendered content in `dist/index.html` `dist/docs.html` and `dist/docs/child.html`.

To properly serve prerendered content use below `nginx` configuration.
```nginx
server {
  listen 80;
  server_name subdomain.example.com example.com;

  root /path/to/dist;

  location / {
    try_files $uri.html $uri $uri/ /index.html;
  }
}
```

### Licence

MIT

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