Skip to content

Commit

Permalink
Feature: gtag, external api keys, reduced styles (orizens#32)
Browse files Browse the repository at this point in the history
* adding: gtag, refined use of api keys and removed unused styles and files

* updated readmea
  • Loading branch information
orizens authored Dec 20, 2017
1 parent 8cd5274 commit 8195302
Show file tree
Hide file tree
Showing 87 changed files with 756 additions and 12,178 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ after_script:
after_success:
# - chmod +x ./config/deploy.sh
# - ./config/deploy.sh
- npm run build:env
- npm run build:prod
- npm run copy:domain
- npm run copy:heroku
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## v 3.9.2 (2017/12/20)
* [NEW] - gtag integration
* [NEW] - youtube api and client keys, analytics key is attached in build time (rather than hard coded in ts, html files)
* [UPGRADE] - unified icon "directive"
* [UPGRADE] - reduced bootstrap unused styles while improving loading performance
* [CHOR] - removed unused files
* [UPDATE] - media controls displays flat background color when in fullscreen now (and not the blury background)

## v 3.9.1 (2017/12/07)
* [NEW] - added new dark "bumblebee" theme
* [NEW] - each media card description (after flip) includes now a link to its YouTube page
Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ My services include:
## Included @ngrx solutions:
- [ngrx/store](https://github.com/ngrx/platform/blob/master/docs/store/README.md) - State Management a la "[Redux](https://github.com/reactjs/redux)" based on RxJs
- [ngrx/effects](https://github.com/ngrx/platform/blob/master/docs/effects/README.md) - Side Effects layer for ngrx/store
- [ngrx/router-store](https://github.com/ngrx/platform/blob/master/docs/router-store/README.md) - Bindings to connect the Angular Router to @ngrx/store
- ~[ngrx/router-store](https://github.com/ngrx/platform/blob/master/docs/router-store/README.md) - Bindings to connect the Angular Router to @ngrx/store~
- [ngrx-store-localstorage](https://github.com/btroncone/ngrx-store-localstorage) - local sotrage support for ngrx/store
- [ngrx/store-devtools](https://github.com/ngrx/platform/blob/master/docs/store-devtools/README.md) - a connector to [redux devtool](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en-US) for chrome

## Included Technologies & Libraries
- [Angular +4.x](http://angular.io)
- [Angular CLI](https://cli.angular.io/)
- [@ngrx Platform v4](https://github.com/ngrx/platform)
- Bootstrap v3.x (SASS)
- Bootstrap v3.x (SASS, selected modules)
- Typescript 2.x
- ES6 / ES2015 (using Loader Spec)

Expand All @@ -61,7 +61,18 @@ Run `ng generate component component-name` to generate a new component. You can
Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

### Build for Production
Run `npm run build:prod` to build the project minified for production with AOT.
Run `npm run build:prod` to build the project minified for production with AOT.

## Configure api keys
Echoes use environment variables to integrate Google Analytics, youtube data api key and youtube client id for authorization.
These defiend as template variables, and are replaced after a successfull build with build-env.js.
### Youtube Keys
Generate your own keys via [google's console](https://console.cloud.google.com/apis/credentials)
Required Keys are:
```API Key```
```OAuth client ID```
### Analytics Key (Optional)
The key is the project ID usually can be retreived from the analytics Admin interface. it exist as part of the "script" to paste in your html file.

## Running unit tests

Expand Down
23 changes: 23 additions & 0 deletions config/build-env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const replace = require("replace");
const analyticsId = process.env.GA_PROJECTID;
const youtubeApiKey = process.env.YT_API_KEY;
const youtubeClientId = process.env.YT_CLIENT_ID;

replace({
regex: '{GA_PROJECTID}',
replacement: analyticsId,
paths: ['./src'],
recursive: true
});
[{
regex: '{YT_API_KEY}',
replacement: youtubeApiKey,
paths: ['./src/environments'],
recursive: true
},
{
regex: '{YT_CLIENT_ID}',
replacement: youtubeClientId,
paths: ['./src/environments'],
recursive: true
}].forEach(options => replace(options));
59 changes: 0 additions & 59 deletions config/github-deploy/index.js

This file was deleted.

45 changes: 0 additions & 45 deletions config/head-config.common.js

This file was deleted.

24 changes: 0 additions & 24 deletions config/helpers.js

This file was deleted.

6 changes: 3 additions & 3 deletions config/heroku/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "echoes-ng2",
"name": "echoes-player",
"version": "3.0.0",
"description": "Echoes Ng2",
"description": "Echoes Player (Angular)",
"main": "index.js",
"scripts": {
"start": "lite-server --config=./bs-config.js"
},
"dependencies": {
"lite-server": "2.2.2"
}
}
}
106 changes: 0 additions & 106 deletions config/html-elements-plugin/index.js

This file was deleted.

Loading

0 comments on commit 8195302

Please sign in to comment.