Skip to content

Commit

Permalink
Merge pull request #126 from wittlock/feature/rework_library_for_angu…
Browse files Browse the repository at this point in the history
…lar9

Feature/rework library for angular9
  • Loading branch information
wittlock authored Mar 5, 2020
2 parents 5f7f2e4 + 2b84a6d commit 2014f38
Show file tree
Hide file tree
Showing 31 changed files with 15,202 additions and 727 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
63 changes: 40 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
# Angular
/compiled
*.metadata.json
*.ngsummary.json
package-lock.json
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Node
node_modules/*
npm-debug.log
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# TypeScript
typings
*.js
*.map
*.d.ts
# dependencies
/node_modules

# JetBrains
.idea
.project
.settings
.idea/*
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
*.iml
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Windows
Thumbs.db
Desktop.ini
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# Mac
# System Files
.DS_Store
**/.DS_Store
Thumbs.db
26 changes: 0 additions & 26 deletions .npmignore

This file was deleted.

4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.MD → README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# angular2-hotkeys
Angular 5, 6, 7 and 8 Compatible. Older versions might work but isn't officially tested.
Angular 9 and Ivy Compatible. Older versions might work but isn't officially tested.
## Installation

To install this library, run:
Expand Down Expand Up @@ -78,7 +78,7 @@ The third parameter, given as `undefined`, can be used to allow the Hotkey to fi

### Cheat Sheet Customization

1. You can now pass in custom options in `HotkeysModule.forRoot(options: IHotkeyOptions)`.
1. You can now pass in custom options in `HotkeyModule.forRoot(options: IHotkeyOptions)`.

```typescript
export interface IHotkeyOptions {
Expand Down
48 changes: 48 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "./",
"projects": {
"angular2-hotkeys": {
"projectType": "library",
"root": "./",
"sourceRoot": "src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "tsconfig.lib.json",
"project": "ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.lib.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "angular2-hotkeys"
}
29 changes: 0 additions & 29 deletions index.ts

This file was deleted.

32 changes: 32 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
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-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/angular2-hotkeys'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
11 changes: 11 additions & 0 deletions ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"dest": "./dist",
"lib": {
"entryFile": "src/public-api.ts"
},
"whitelistedNonPeerDependencies": [
"mousetrap",
"@types/mousetrap"
]
}
Loading

0 comments on commit 2014f38

Please sign in to comment.