Skip to content

Commit efd863f

Browse files
authored
Merge pull request #5 from maxime1992/feat/use-angular-cli-and-upgrade-to-v8
feat: upgrade to Angular 8.x This closes #4
2 parents 1269638 + 43a7f5c commit efd863f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+8470
-3271
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,46 @@
1-
# Node
2-
node_modules/*
3-
npm-debug.log
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
49

5-
# TypeScript
6-
src/*.js
7-
src/*.map
8-
src/*.d.ts
10+
# dependencies
11+
/node_modules
912

10-
# JetBrains
11-
.idea
13+
# profiling files
14+
chrome-profiler-events.json
15+
speed-measure-plugin.json
16+
17+
# IDEs and editors
18+
/.idea
1219
.project
13-
.settings
14-
.idea/*
15-
*.iml
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
1625

17-
# VS Code
26+
# IDE - VSCode
1827
.vscode/*
19-
.history
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
2033

21-
# Windows
22-
Thumbs.db
23-
Desktop.ini
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
2443

25-
# Mac
44+
# System Files
2645
.DS_Store
27-
**/.DS_Store
28-
29-
# Ngc generated files
30-
**/*.ngfactory.ts
31-
32-
# Build files
33-
dist/*
46+
Thumbs.db

.npmignore

Lines changed: 0 additions & 34 deletions
This file was deleted.

.prettierignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# angular gitignore
2+
# see https://github.com/prettier/prettier/issues/2294
3+
4+
## compiled output
5+
/dist
6+
/tmp
7+
/out-tsc
8+
9+
## dependencies
10+
/node_modules
11+
12+
## IDEs and editors
13+
/.idea
14+
.project
15+
.classpath
16+
.c9/
17+
*.launch
18+
.settings/
19+
*.sublime-workspace
20+
.vscode/*
21+
.history
22+
23+
# auto-generated files
24+
/angular.json
25+
/.angular-cli.json
26+
/package-lock.json
27+
/yarn.lock

.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "all",
8+
"bracketSpacing": true,
9+
"arrowParens": "avoid",
10+
"proseWrap": "preserve",
11+
"htmlWhitespaceSensitivity": "ignore"
12+
}

.releaserc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"pkgRoot": "dist/ngx-hover-opacity"
3+
}

.travis.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
1-
language: node_js
21
sudo: false
2+
3+
language: node_js
34
node_js:
4-
- '4.2.1'
5+
- '10'
6+
7+
cache: yarn
8+
9+
install:
10+
- yarn --frozen-lockfile --non-interactive --no-progress
11+
12+
script:
13+
# lint
14+
- yarn run demo:lint:check
15+
- yarn run prettier:check
16+
# build
17+
- yarn run lib:build:prod
18+
- yarn run demo:build:prod --progress=false --base-href "https://cloudnc.github.io/ngx-hover-opacity/"
19+
# publish to npm
20+
- yarn global add cpy-cli --ignore-engines
21+
- cpy README.md dist/ngx-hover-opacity
22+
- test $TRAVIS_BRANCH = "master" && yarn run semantic-release || echo "Skipping deploy"
23+
24+
deploy:
25+
skip_cleanup: true
26+
provider: pages
27+
github_token: $GH_TOKEN
28+
local_dir: dist/ngx-hover-opacity-demo
29+
on:
30+
branch: master

.yo-rc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# ngx-hover-opacity
2-
This librairy aims to provide a simple way to "disable" an entire HTML element.
32

4-
For example, if you display a given resource and suddenly it is not available anymore (deleted on the server and you just received an event).
5-
Should you redirect the user to the home page? If he was reading it, it's a little brutal, isn't it?
3+
This librairy aims to provide a simple way to visually "disable" an entire HTML element.
64

7-
Instead of that, you might want to take a breath and do not remove the element right away.
8-
Just hover it, with a nice opacity so the user cannot interact with it anymore.
5+
For example, if you display a given resource and suddenly it's not available anymore (deleted on the server and you just received an event).
6+
Should you redirect the user to the home page? If he was reading it, it's a little rough, isn't it?
7+
8+
Instead of that, you might want to hover it, with a nice opacity, so the user cannot interact with it anymore.
99
(Maybe you could also let him know what's happening with a message, but it's up to you).
1010

11-
## Demo:
11+
## Demo:
1212

1313
ngx-hover-opacity set to **OFF**
14-
![An MdCard from material with ngx-hover-opacity set to OFF](https://user-images.githubusercontent.com/4950209/29740631-2ee2ca28-8a5b-11e7-9f61-19681ab07fbd.png)
14+
![A MatCard from material with ngx-hover-opacity set to OFF](https://user-images.githubusercontent.com/4950209/29740631-2ee2ca28-8a5b-11e7-9f61-19681ab07fbd.png)
1515

1616
ngx-hover-opacity set to **ON**
17-
![An MdCard from material with ngx-hover-opacity set to ON](https://user-images.githubusercontent.com/4950209/29740633-4446d972-8a5b-11e7-9c61-f231d40d803a.png)
17+
![A MatCard from material with ngx-hover-opacity set to ON](https://user-images.githubusercontent.com/4950209/29740633-4446d972-8a5b-11e7-9c61-f231d40d803a.png)
1818

1919
You can also [try it live on Stackblitz!](https://stackblitz.com/edit/angular-se17ec)
2020

@@ -25,7 +25,9 @@ To install this library, run:
2525
```bash
2626
$ yarn add ngx-hover-opacity
2727
```
28+
2829
or
30+
2931
```bash
3032
$ npm install ngx-hover-opacity --save
3133
```
@@ -37,26 +39,23 @@ From your Angular module (`AppModule` for example):
3739
```typescript
3840
import { BrowserModule } from '@angular/platform-browser';
3941
import { NgModule } from '@angular/core';
40-
4142
import { AppComponent } from './app.component';
4243

4344
// import the module
4445
import { NgxHoverOpacityModule } from 'ngx-hover-opacity';
4546

4647
@NgModule({
47-
declarations: [
48-
AppComponent
49-
],
48+
declarations: [AppComponent],
5049
imports: [
5150
BrowserModule,
5251

5352
// specify it as an import
54-
NgxHoverOpacityModule
53+
NgxHoverOpacityModule,
5554
],
5655
providers: [],
57-
bootstrap: [AppComponent]
56+
bootstrap: [AppComponent],
5857
})
59-
export class AppModule { }
58+
export class AppModule {}
6059
```
6160

6261
Once your library is imported, you can use the component `ngx-hover-opacity` in your Angular application:
@@ -67,18 +66,6 @@ Once your library is imported, you can use the component `ngx-hover-opacity` in
6766
</ngx-hover-opacity>
6867
```
6968

70-
## Development
71-
72-
To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:
73-
74-
```bash
75-
$ yarn run build
76-
```
77-
or
78-
```bash
79-
$ npm run build
80-
```
81-
8269
## License
8370

8471
MIT © [Maxime ROBERT](mailto:[email protected])

0 commit comments

Comments
 (0)