-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from maxime1992/feat/use-angular-cli-and-upgrad…
…e-to-v8 feat: upgrade to Angular 8.x This closes #4
- Loading branch information
Showing
60 changed files
with
8,470 additions
and
3,271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
# Node | ||
node_modules/* | ||
npm-debug.log | ||
# 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 | ||
|
||
# TypeScript | ||
src/*.js | ||
src/*.map | ||
src/*.d.ts | ||
# dependencies | ||
/node_modules | ||
|
||
# JetBrains | ||
.idea | ||
# profiling files | ||
chrome-profiler-events.json | ||
speed-measure-plugin.json | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.settings | ||
.idea/* | ||
*.iml | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# VS Code | ||
# IDE - VSCode | ||
.vscode/* | ||
.history | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
.history/* | ||
|
||
# Windows | ||
Thumbs.db | ||
Desktop.ini | ||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
|
||
# Mac | ||
# System Files | ||
.DS_Store | ||
**/.DS_Store | ||
|
||
# Ngc generated files | ||
**/*.ngfactory.ts | ||
|
||
# Build files | ||
dist/* | ||
Thumbs.db |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# angular gitignore | ||
# see https://github.com/prettier/prettier/issues/2294 | ||
|
||
## compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
|
||
## dependencies | ||
/node_modules | ||
|
||
## IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
.vscode/* | ||
.history | ||
|
||
# auto-generated files | ||
/angular.json | ||
/.angular-cli.json | ||
/package-lock.json | ||
/yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"arrowParens": "avoid", | ||
"proseWrap": "preserve", | ||
"htmlWhitespaceSensitivity": "ignore" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"pkgRoot": "dist/ngx-hover-opacity" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,30 @@ | ||
language: node_js | ||
sudo: false | ||
|
||
language: node_js | ||
node_js: | ||
- '4.2.1' | ||
- '10' | ||
|
||
cache: yarn | ||
|
||
install: | ||
- yarn --frozen-lockfile --non-interactive --no-progress | ||
|
||
script: | ||
# lint | ||
- yarn run demo:lint:check | ||
- yarn run prettier:check | ||
# build | ||
- yarn run lib:build:prod | ||
- yarn run demo:build:prod --progress=false --base-href "https://cloudnc.github.io/ngx-hover-opacity/" | ||
# publish to npm | ||
- yarn global add cpy-cli --ignore-engines | ||
- cpy README.md dist/ngx-hover-opacity | ||
- test $TRAVIS_BRANCH = "master" && yarn run semantic-release || echo "Skipping deploy" | ||
|
||
deploy: | ||
skip_cleanup: true | ||
provider: pages | ||
github_token: $GH_TOKEN | ||
local_dir: dist/ngx-hover-opacity-demo | ||
on: | ||
branch: master |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
# ngx-hover-opacity | ||
This librairy aims to provide a simple way to "disable" an entire HTML element. | ||
|
||
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). | ||
Should you redirect the user to the home page? If he was reading it, it's a little brutal, isn't it? | ||
This librairy aims to provide a simple way to visually "disable" an entire HTML element. | ||
|
||
Instead of that, you might want to take a breath and do not remove the element right away. | ||
Just hover it, with a nice opacity so the user cannot interact with it anymore. | ||
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). | ||
Should you redirect the user to the home page? If he was reading it, it's a little rough, isn't it? | ||
|
||
Instead of that, you might want to hover it, with a nice opacity, so the user cannot interact with it anymore. | ||
(Maybe you could also let him know what's happening with a message, but it's up to you). | ||
|
||
## Demo: | ||
## Demo: | ||
|
||
ngx-hover-opacity set to **OFF** | ||
![An MdCard from material with ngx-hover-opacity set to OFF](https://user-images.githubusercontent.com/4950209/29740631-2ee2ca28-8a5b-11e7-9f61-19681ab07fbd.png) | ||
![A MatCard from material with ngx-hover-opacity set to OFF](https://user-images.githubusercontent.com/4950209/29740631-2ee2ca28-8a5b-11e7-9f61-19681ab07fbd.png) | ||
|
||
ngx-hover-opacity set to **ON** | ||
![An MdCard from material with ngx-hover-opacity set to ON](https://user-images.githubusercontent.com/4950209/29740633-4446d972-8a5b-11e7-9c61-f231d40d803a.png) | ||
![A MatCard from material with ngx-hover-opacity set to ON](https://user-images.githubusercontent.com/4950209/29740633-4446d972-8a5b-11e7-9c61-f231d40d803a.png) | ||
|
||
You can also [try it live on Stackblitz!](https://stackblitz.com/edit/angular-se17ec) | ||
|
||
|
@@ -25,7 +25,9 @@ To install this library, run: | |
```bash | ||
$ yarn add ngx-hover-opacity | ||
``` | ||
|
||
or | ||
|
||
```bash | ||
$ npm install ngx-hover-opacity --save | ||
``` | ||
|
@@ -37,26 +39,23 @@ From your Angular module (`AppModule` for example): | |
```typescript | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { AppComponent } from './app.component'; | ||
|
||
// import the module | ||
import { NgxHoverOpacityModule } from 'ngx-hover-opacity'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
declarations: [AppComponent], | ||
imports: [ | ||
BrowserModule, | ||
|
||
// specify it as an import | ||
NgxHoverOpacityModule | ||
NgxHoverOpacityModule, | ||
], | ||
providers: [], | ||
bootstrap: [AppComponent] | ||
bootstrap: [AppComponent], | ||
}) | ||
export class AppModule { } | ||
export class AppModule {} | ||
``` | ||
|
||
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 | |
</ngx-hover-opacity> | ||
``` | ||
|
||
## Development | ||
|
||
To generate all `*.js`, `*.d.ts` and `*.metadata.json` files: | ||
|
||
```bash | ||
$ yarn run build | ||
``` | ||
or | ||
```bash | ||
$ npm run build | ||
``` | ||
|
||
## License | ||
|
||
MIT © [Maxime ROBERT](mailto:[email protected]) |
Oops, something went wrong.