# base-ionic

> base: An Ionic project

Latest version **2.0.0** (published 2017-04-09) · 0 weekly downloads

## Install

```sh
npm install base-ionic
pnpm add base-ionic
yarn add base-ionic
bun add base-ionic
```

## 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 | 2.0.0 |
| Published | 2017-04-09 |
| First published | 2017-04-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 19 |
| Known vulnerabilities | 0 (+22 in 4 direct dependencies) |
| Install scripts | no |
| Author | Jose Vargas |
| Maintainers | ruedagato94 |

## Links

- npm: https://www.npmjs.com/package/base-ionic
- Homepage: http://ionicframework.com/
- npm.io page: https://npm.io/package/base-ionic

## Dependencies (19)

- [rxjs](https://npm.io/package/rxjs.md) 5.1.1
- [zone.js](https://npm.io/package/zone.js.md) ^0.8.4
- [firebase](https://npm.io/package/firebase.md) ^3.6.9
- [ionicons](https://npm.io/package/ionicons.md) 3.0.0
- [sw-toolbox](https://npm.io/package/sw-toolbox.md) 3.4.0
- [ionic-native](https://npm.io/package/ionic-native.md) 2.4.1
- [@angular/core](https://npm.io/package/@angular/core.md) 4.0.0
- [@angular/http](https://npm.io/package/@angular/http.md) 4.0.0
- [ionic-angular](https://npm.io/package/ionic-angular.md) 3.0.1
- [@angular/forms](https://npm.io/package/@angular/forms.md) 4.0.0
- [@ionic/storage](https://npm.io/package/@ionic/storage.md) 2.0.1
- [@angular/common](https://npm.io/package/@angular/common.md) 4.0.0
- [@angular/compiler](https://npm.io/package/@angular/compiler.md) 4.0.0
- [@ionic-native/core](https://npm.io/package/@ionic-native/core.md) 3.4.2
- [@angular/compiler-cli](https://npm.io/package/@angular/compiler-cli.md) 4.0.0
- [@ionic-native/status-bar](https://npm.io/package/@ionic-native/status-bar.md) 3.4.2
- [@angular/platform-browser](https://npm.io/package/@angular/platform-browser.md) 4.0.0
- [@ionic-native/splash-screen](https://npm.io/package/@ionic-native/splash-screen.md) 3.4.2
- [@angular/platform-browser-dynamic](https://npm.io/package/@angular/platform-browser-dynamic.md) 4.0.0

## Recent versions

- 2.0.0 (latest) — 2017-04-09

## README

# BaseIonic

This is a templete with some ommon codes for general aplications, this include general function of Firebase

## Prerequisites

* Ionic CLI Version: >2.2.1   
* Ionic App Lib Version: >2.2.0    
* Cordova CLI: >6.5.0  
* Node Version: >v7.3.0
* Create a proyect in [Firebase](https://firebase.google.com/)
* Create a app in [Facebook](https://developers.facebook.com/) developers
* Create a count in [Ionic Cloud](https://ionic.io/cloud)


## Instalation

1.  Clone repository
	``` bash
	$ git clone https://github.com/IWite/baseIonic.git
	```
  
2. Install dependencies   
	``` bash
	$ npm install
	```
3. Add plugin of Facebook with the credentials of your app in Facebook developers
	```bash
	$ ionic plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication" --save
	``` 

4. Install platform
	``` bash
	$ ionic platform add android
	$ ionic platform add ios
	```

5. initialize the app in ionic cloud
	``` bash
	$ ionic io init
	```

## Configuration
1. Set the config variables of firebase in `env/dev.json` and `env/prod.json` (Don't change the key `firebase_config`)
```json
{
  "firebase_config": {
    "apiKey": "",
    "authDomain": "",
    "databaseURL": "",
    "projectId": "",
    "storageBucket": "",
    "messagingSenderId": ""
  }
}
```

## Environments
This project have two json where is possible to add variables to use in production or development environment.

To use diferents environtmens use `--prod` for production and not put nothing for development
``` bash
$ ionic serve
$ ionic serve --prod
```

Add `ENV.data` varible in your component to use the environmet variable
```typescript

...
declare const ENV;
...

constructor(public magicBall: MagicBall) {
    console.log(ENV.data)
}
```

## Unit Test
Now is possible to run unit test in ionic 2
```
$ npm test
```
All dependencies to create and run unit test were installed, you only need to create de unit test file:

[Create unit test](https://www.joshmorony.com/how-to-unit-test-an-ionic-2-application/)


## Documentation
For generate a file with web page documentation run:
```
$ npm run docs
```

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