Skip to content

Commit

Permalink
Merge pull request #24 from mralexandernickel/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mralexandernickel authored Sep 11, 2019
2 parents daf696b + c4b041f commit 487caa2
Show file tree
Hide file tree
Showing 95 changed files with 3,666 additions and 3,383 deletions.
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
Expand All @@ -27,6 +29,7 @@ speed-measure-plugin.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
Expand All @@ -37,11 +40,7 @@ npm-debug.log
yarn-error.log
testem.log
/typings
.angulardoc.json


# System Files
.DS_Store
Thumbs.db


12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ node_js:
cache:
yarn: true
directories:
- './node_modules'
- "./node_modules"
before_script:
- yarn build angular-intersection
- yarn build --prod --base-href=/angular-intersection/
- yarn build ngx-intersection
- yarn build --prod --base-href=/ngx-intersection/
script:
- yarn lint
- yarn test
after_success:
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
- curl -X PURGE https://camo.githubusercontent.com/d3134cc10a8946ed6a45830a67af27da9391935a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d72616c6578616e6465726e69636b656c2f6e67782d706963747572652f62616467652e7376673f6272616e63683d6d6173746572
before_deploy:
- cd $TRAVIS_BUILD_DIR/dist/angular-intersection
- cd $TRAVIS_BUILD_DIR/dist/ngx-intersection
deploy:
- provider: npm
email: [email protected]
skip-cleanup: true
api_key:
secure: Y0vwIBulx+b/oQRYdxaHBw4jxhujF+rPnWB9sVQ10uHR173CMdKbFnK+a98G9byXyqNMs0cXnGdxUiWuQlE71HFeLzjwtDdrNKkVmqfOCUG1MTjp5VYQZDLVkj/tMDmCI+gKcah0BKxPDn+fhsQw0KUMDbYLLQUv3MPXFRUvahU3Lm/nXrQqBBWaRJ3PrDi8Jdv4qVHhqIjANkUmc0S/xt2vLAlVaC3lgd0lVbOZw7HrEcfrLbnEmH2iEtF66tY1NQtY3/Hq93RWsOU0cH3numj2Z0I/kVb+WzAwTZLFXmfBmGH26WjXeeozBDJemN+M9mMGIF6N2sxf9RnQUoFF0PvOaWMSyNgDtPZy6Gj4oz0vloYNw32uaBiLe2kKlKUlOcvLUaJUit0ETR14UwQ25RbdEPFX8dOtd1t1suEX+uHedjPe10Ca2j98JVpGd7Fv/Yt+M1nil9ZwJWKAGMyWxeSzNiOClWZxoEEdI0MOZWuShZDwL7kHw0+aS1Yj5G+KPD46XfQkK+R8aSgJDSEuhSUHRASL9ObB1s1lzY51zQbkibfgAUvIE33DX7W9ruikhYg58l6HVdLTfRNITq8ZIXA3PhqDWPjB+iMVtk9c6O5S1X3jFKBDCiApq0J/5sK7rOvJkwWHPRjUKR9UUlVxRmiT3/+isw4lvWksiINHWTQ=
on:
repo: mralexandernickel/ngx-intersection
tags: true
repo: mralexandernickel/angular-intersection
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
local-dir: dist/angular-intersection-demo
local-dir: dist/ngx-intersection-demo
on:
branch: master
18 changes: 9 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#d04649",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#37cb34",
"activityBarBadge.foreground": "#15202b",
"statusBar.background": "#b52e31",
"statusBarItem.hoverBackground": "#d04649",
"statusBar.foreground": "#e7e7e7"
"activityBar.background": "#d1c766",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#2c9389",
"activityBarBadge.foreground": "#e7e7e7",
"statusBar.background": "#c5b93f",
"statusBarItem.hoverBackground": "#a19630",
"statusBar.foreground": "#15202b"
},
"peacock.color": "#b52e31"
"peacock.color": "#c5b93f"
}
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[![Build Status](https://travis-ci.org/mralexandernickel/angular-intersection.svg?branch=master)](https://travis-ci.org/mralexandernickel/angular-intersection)
[![Coverage Status](https://coveralls.io/repos/github/mralexandernickel/angular-intersection/badge.svg?branch=master)](https://coveralls.io/github/mralexandernickel/angular-intersection?branch=master)
[![npm version](https://badge.fury.io/js/%40mralexandernickel%2Fangular-intersection.svg)](https://www.npmjs.com/@mralexandernickel/angular-intersection)
[![Build Status](https://travis-ci.org/mralexandernickel/ngx-intersection.svg?branch=master)](https://travis-ci.org/mralexandernickel/ngx-intersection)
[![Coverage Status](https://coveralls.io/repos/github/mralexandernickel/ngx-intersection/badge.svg?branch=master)](https://coveralls.io/github/mralexandernickel/ngx-intersection?branch=master)
[![npm version](https://badge.fury.io/js/%40mralexandernickel%2Fngx-intersection.svg)](https://www.npmjs.com/@mralexandernickel/ngx-intersection)

# Angular Intersection

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.1.3.
# ngx-intersection

## Events

Expand Down Expand Up @@ -43,7 +41,7 @@ inside your NgModule:
import {
ROOT_MARGIN_FUTURE,
THRESHOLD_END
} from '@mralexandernickel/angular-intersection';
} from '@mralexandernickel/ngx-intersection';

@NgModule({
// ...
Expand Down
98 changes: 45 additions & 53 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,26 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"angular-intersection-demo": {
"root": "",
"sourceRoot": "src",
"ngx-intersection-demo": {
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "styl"
"style": "styl"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/angular-intersection-demo",
"outputPath": "dist/ngx-intersection-demo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
Expand Down Expand Up @@ -52,116 +53,107 @@
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}]
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "angular-intersection-demo:build"
"browserTarget": "ngx-intersection-demo:build"
},
"configurations": {
"production": {
"browserTarget": "angular-intersection-demo:build:production"
"browserTarget": "ngx-intersection-demo:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular-intersection-demo:build"
"browserTarget": "ngx-intersection-demo:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.styl"
],
"scripts": [],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
]
],
"styles": [
"src/styles.styl"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"angular-intersection-demo-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "angular-intersection-demo:serve"
"devServerTarget": "ngx-intersection-demo:serve"
},
"configurations": {
"production": {
"devServerTarget": "angular-intersection-demo:serve:production"
"devServerTarget": "ngx-intersection-demo:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"angular-intersection": {
"root": "projects/angular-intersection",
"sourceRoot": "projects/angular-intersection/src",
"ngx-intersection": {
"projectType": "library",
"root": "projects/ngx-intersection",
"sourceRoot": "projects/ngx-intersection/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/angular-intersection/tsconfig.lib.json",
"project": "projects/angular-intersection/ng-package.json"
"tsConfig": "projects/ngx-intersection/tsconfig.lib.json",
"project": "projects/ngx-intersection/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/angular-intersection/src/test.ts",
"tsConfig": "projects/angular-intersection/tsconfig.spec.json",
"karmaConfig": "projects/angular-intersection/karma.conf.js"
"main": "projects/ngx-intersection/src/test.ts",
"tsConfig": "projects/ngx-intersection/tsconfig.spec.json",
"karmaConfig": "projects/ngx-intersection/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/angular-intersection/tsconfig.lib.json",
"projects/angular-intersection/tsconfig.spec.json"
"projects/ngx-intersection/tsconfig.lib.json",
"projects/ngx-intersection/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
Expand All @@ -171,5 +163,5 @@
}
}
},
"defaultProject": "angular-intersection-demo"
"defaultProject": "ngx-intersection-demo"
}
12 changes: 12 additions & 0 deletions browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
6 changes: 5 additions & 1 deletion e2e/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');

/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
Expand All @@ -21,7 +25,7 @@ exports.config = {
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
Expand Down
11 changes: 10 additions & 1 deletion e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';

describe('workspace-project App', () => {
let page: AppPage;
Expand All @@ -9,6 +10,14 @@ describe('workspace-project App', () => {

it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to angular-intersection!');
expect(page.getTitleText()).toEqual('ngx-intersection app is running!');
});

afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
4 changes: 2 additions & 2 deletions e2e/src/app.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo() {
return browser.get('/');
return browser.get(browser.baseUrl) as Promise<any>;
}

getTitleText() {
return element(by.css('app-root h1')).getText();
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}
Loading

0 comments on commit 487caa2

Please sign in to comment.