Skip to content

Commit

Permalink
feat(scroll-collapse): adding angular 6 support
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Updated peer dependencies to rxjs 6.x and @thisissoon/angular-inviewport 3.x
  • Loading branch information
edoparearyee committed May 29, 2018
1 parent 42959c4 commit e1d785e
Show file tree
Hide file tree
Showing 10 changed files with 6,356 additions and 3,950 deletions.
60 changes: 0 additions & 60 deletions .angular-cli.json

This file was deleted.

31 changes: 18 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
dist: trusty
sudo: false
language: node_js
node_js:
- "8"
os:
- linux
before_install:
# Use a virtual display.
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# Install latest chrome.
- export CHROME_BIN=chromium-browser

addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable

cache:
directories:
- ./node_modules

install:
- npm install --no-progress
- npm i --no-progress

script:
# Use Chromium instead of Chrome.
- export CHROME_BIN=chromium-browser
- npm run lint
- npm run test -- --no-progress --code-coverage --single-run --browser=ChromeNoSandbox
- npm run e2e -- --no-progress
- xvfb-run -a npm run test -- --watch false --code-coverage
- xvfb-run -a npm run e2e
- npm run coverage
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
[![Coverage Status][coveralls-badge]][coveralls-badge-url]
[![Commitizen friendly][commitizen-badge]][commitizen]

This project was generated with [Angular CLI][angular-cli] version 1.5.4.

A simple lightweight library for [Angular][angular] that detects scroll direction and adds a `sn-scrolling-up` or `sn-scrolling-down` class to the element. The library can also detect when the user has scrolled passed the element and apply a `sn-affix` class. Useful for make a element sticky when the user has scrolled beyond it. This library can will also apply `sn-minimise` class after the user has scrolled beyond the height of the element.

This is a simple library for [Angular][angular], implemented in the [Angular Package Format v5.0][apfv5].
Expand Down
134 changes: 134 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"angular-scroll-collapse": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"progress": false,
"assets": [
"src/assets",
"src/favicon.ico"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "angular-scroll-collapse:build"
},
"configurations": {
"production": {
"browserTarget": "angular-scroll-collapse:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular-scroll-collapse:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"progress": false,
"scripts": [],
"styles": [
"src/styles.scss"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"angular-scroll-collapse-e2e": {
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "angular-scroll-collapse:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "angular-scroll-collapse",
"schematics": {
"@schematics/angular:component": {
"prefix": "sn",
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "sn"
}
}
}
8 changes: 4 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-spec-reporter')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly', 'text-summary' ],
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly', 'text-summary' ],
fixWebpackSourcePaths: true
},
angularCli: {
Expand All @@ -30,7 +30,7 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ['ChromeNoSandbox'],
customLaunchers: {
ChromeNoSandbox: {
base: 'Chrome',
Expand Down
Loading

0 comments on commit e1d785e

Please sign in to comment.