Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 #130

Merged
merged 7 commits into from
Aug 30, 2021
Merged

v4 #130

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

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

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
11 changes: 7 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# editorconfig.org
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
50 changes: 50 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "mwl",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "mwl",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
48 changes: 45 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
.idea
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json

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

# 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
projects/angular-resizable-element/package.json

# System Files
.DS_Store
node_modules
coverage
Thumbs.db
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx validate-commit-msg
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx pretty-quick --staged
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js

node_js:
- '10'
- '14'

script: npm test

Expand All @@ -10,10 +10,10 @@ notifications:

cache:
directories:
- node_modules
- node_modules

after_success:
- npm run codecov
- npm run codecov

addons:
chrome: stable
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Demo

https://mattlewis92.github.io/angular-resizable-element/demo/
https://mattlewis92.github.io/angular-resizable-element/

## Table of contents

Expand All @@ -20,7 +20,7 @@ https://mattlewis92.github.io/angular-resizable-element/demo/

## About

An angular 6.0+ directive that allows an element to be dragged and resized
An angular 10.0+ directive that allows an element to be dragged and resized

## Installation

Expand Down Expand Up @@ -89,7 +89,7 @@ import { ResizeEvent } from 'angular-resizable-element';
.resize-handle-right {
right: 0;
}
`
`,
],
template: `
<div
Expand Down Expand Up @@ -119,7 +119,7 @@ import { ResizeEvent } from 'angular-resizable-element';
[resizeEdges]="{ bottom: true }"
></div>
</div>
`
`,
})
export class MyComponent {
onResizeEnd(event: ResizeEvent): void {
Expand All @@ -134,7 +134,7 @@ import { ResizableModule } from 'angular-resizable-element';
@NgModule({
declarations: [MyComponent],
imports: [ResizableModule],
bootstrap: [MyComponent]
bootstrap: [MyComponent],
})
class MyModule {}
```
Expand Down
143 changes: 143 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"demo": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "projects/demo",
"prefix": "mwl",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/demo",
"index": "projects/demo/index.html",
"main": "projects/demo/main.ts",
"polyfills": "projects/demo/polyfills.ts",
"tsConfig": "projects/demo/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"projects/demo/favicon.ico",
"projects/demo/assets"
],
"styles": [
"projects/demo/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "projects/demo/environments/environment.ts",
"with": "projects/demo/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "demo:build:production"
},
"development": {
"browserTarget": "demo:build:development"
}
},
"defaultConfiguration": "development"
},
"deploy": {
"builder": "angular-cli-ghpages:deploy",
"options": {
"noSilent": true,
"noBuild": true
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/demo/**/*.ts",
"projects/demo/**/*.html"
]
}
}
}
},
"angular-resizable-element": {
"projectType": "library",
"root": "projects/angular-resizable-element",
"sourceRoot": "projects/angular-resizable-element/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/angular-resizable-element/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/angular-resizable-element/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/angular-resizable-element/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/angular-resizable-element/src/test.ts",
"tsConfig": "projects/angular-resizable-element/tsconfig.spec.json",
"karmaConfig": "projects/angular-resizable-element/karma.conf.ts"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/angular-resizable-element/**/*.ts",
"projects/angular-resizable-element/**/*.html"
]
}
}
}
}
},
"defaultProject": "demo"
}
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore:
- 'projects/angular-resizable-element/src/test.ts'
- 'projects/angular-resizable-element/src/test/polyfills.ts'
11 changes: 0 additions & 11 deletions demo/entry.ts

This file was deleted.

Loading