Skip to content

Commit e58e725

Browse files
committed
Migrate to Addon V2 format
1 parent fbd7c4f commit e58e725

Some content is hidden

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

74 files changed

+11960
-13493
lines changed

.ember-cli

-9
This file was deleted.

.github/workflows/ci.yml

+32-19
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,41 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v2
23+
with:
24+
version: 7
2125
- name: Install Node
22-
uses: actions/setup-node@v2
26+
uses: actions/setup-node@v3
2327
with:
24-
node-version: 12.x
25-
cache: npm
28+
node-version: 14.x
29+
cache: pnpm
2630
- name: Install Dependencies
27-
run: npm install --no-shrinkwrap
31+
run: pnpm install --frozen-lockfile
2832
- name: Lint
29-
run: npm run lint
33+
run: pnpm lint
3034
- name: Run Tests
31-
run: npm run test:ember
35+
run: pnpm test
3236

3337
floating:
3438
name: "Floating Dependencies"
3539
runs-on: ubuntu-latest
3640

3741
steps:
38-
- uses: actions/checkout@v2
39-
- uses: actions/setup-node@v2
42+
- uses: actions/checkout@v3
43+
- name: Install pnpm
44+
uses: pnpm/action-setup@v2
45+
with:
46+
version: 7
47+
- uses: actions/setup-node@v3
4048
with:
41-
node-version: 12.x
42-
cache: npm
49+
node-version: 14.x
50+
cache: pnpm
4351
- name: Install Dependencies
44-
run: npm install --no-shrinkwrap
52+
run: pnpm install --no-lockfile
4553
- name: Run Tests
46-
run: npm run test:ember
54+
run: pnpm test
4755

4856
try-scenarios:
4957
name: ${{ matrix.try-scenario }}
@@ -57,22 +65,27 @@ jobs:
5765
- ember-3.8
5866
- ember-lts-3.24
5967
- ember-lts-3.28
68+
- ember-lts-4.4
6069
- ember-release
6170
- ember-beta
6271
- ember-canary
6372
- ember-classic
64-
- ember-default-with-jquery
6573
- embroider-safe
6674
- embroider-optimized
6775

6876
steps:
69-
- uses: actions/checkout@v2
77+
- uses: actions/checkout@v3
78+
- name: Install pnpm
79+
uses: pnpm/action-setup@v2
80+
with:
81+
version: 7
7082
- name: Install Node
71-
uses: actions/setup-node@v2
83+
uses: actions/setup-node@v3
7284
with:
73-
node-version: 12.x
74-
cache: npm
85+
node-version: 14.x
86+
cache: pnpm
7587
- name: Install Dependencies
76-
run: npm install --no-shrinkwrap
88+
run: pnpm install --frozen-lockfile
7789
- name: Run Tests
7890
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
91+
working-directory: test-app

.gitignore

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

33
# compiled output
4-
/dist/
5-
/tmp/
4+
dist/
65

76
# dependencies
8-
/bower_components/
9-
/node_modules/
7+
node_modules/
108

119
# misc
1210
/.env*
1311
/.pnp*
12+
/.pnpm-debug.log
1413
/.sass-cache
15-
/.eslintcache
14+
.eslintcache
1615
/connect.lock
1716
/coverage/
1817
/libpeerconnection.log
@@ -22,5 +21,5 @@
2221

2322
# ember-try
2423
/.node_modules.ember-try/
25-
/bower.json.ember-try
2624
/package.json.ember-try
25+
/yarn.lock.ember-try

.npmignore

-36
This file was deleted.

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
/coverage/
1515
!.*
1616
.eslintcache
17+
.lint-todo/
1718

1819
# ember-try
1920
/.node_modules.ember-try/
2021
/bower.json.ember-try
22+
/npm-shrinkwrap.json.ember-try
2123
/package.json.ember-try
24+
/package-lock.json.ember-try
25+
/yarn.lock.ember-try

.travis.yml

-64
This file was deleted.

CONTRIBUTING.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,28 @@
44

55
* `git clone <repository-url>`
66
* `cd ember-click-outside`
7-
* `yarn install`
7+
* `pnpm install`
88

99
## Linting
1010

11-
* `yarn lint`
12-
* `yarn lint:fix`
11+
* `pnpm lint`
12+
* `pnpm lint:fix`
13+
14+
## Building the addon
15+
16+
* `cd ember-click-outside`
17+
* `pnpm build`
1318

1419
## Running tests
1520

16-
* `ember test` – Runs the test suite on the current Ember version
17-
* `ember test --server` – Runs the test suite in "watch mode"
18-
* `ember try:each` – Runs the test suite against multiple Ember versions
21+
* `cd test-app`
22+
* `pnpm test` – Runs the test suite on the current Ember version
23+
* `pnpm test:watch` – Runs the test suite in "watch mode"
1924

20-
## Running the dummy application
25+
## Running the test application
2126

22-
* `ember serve`
23-
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
27+
* `cd test-app`
28+
* `pnpm start`
29+
* Visit the test application at [http://localhost:4200](http://localhost:4200).
2430

25-
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
31+
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Gabor Babicz
3+
Copyright (c) 2023 Gabor Babicz
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

README.md

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
1-
# ember-click-outside [![Build Status](https://travis-ci.org/zeppelin/ember-click-outside.svg)](https://travis-ci.org/zeppelin/ember-click-outside) [![Ember Observer Score](http://emberobserver.com/badges/ember-click-outside.svg)](http://emberobserver.com/addons/ember-click-outside)
1+
ember-click-outside [![Ember Observer Score](http://emberobserver.com/badges/ember-click-outside.svg)](http://emberobserver.com/addons/ember-click-outside)
2+
==============================================================================
23

34
A handy modifier for detecting click events fired outside an element.
45

56
![click outside logo](click-outside-logo.png)
67

7-
## Installation
8+
Compatibility
9+
------------------------------------------------------------------------------
810

911
* Ember.js v3.4 or above
10-
* Ember CLI v3.4 or above
11-
* Node.js v12 or above
12+
* Embroider or ember-auto-import v2
1213

1314
*If you're running ember-source <3.22, you need to install [ember-destroyable-polyfill](https://github.com/ember-polyfills/ember-destroyable-polyfill) to get the modifier working.*
1415

1516
*If you're running ember-source <3.8, you need to install [ember-modifier-manager-polyfill](https://github.com/rwjblue/ember-modifier-manager-polyfill) to get the modifier working.*
1617

18+
Installation
19+
------------------------------------------------------------------------------
1720

1821
From within your ember-cli project directory install the addon:
1922
```bash
2023
ember install ember-click-outside
2124
```
2225

23-
## Usage
26+
Usage
27+
------------------------------------------------------------------------------
2428

2529
```hbs
2630
<div {{on-click-outside this.someAction}}>
@@ -45,8 +49,21 @@ You can listen for events other than `click` by using the `eventType` attribute:
4549
</div>
4650
```
4751

48-
## Behavior
52+
How it works?
53+
------------------------------------------------------------------------------
4954

5055
For every click in the document, `ember-click-outside` will check if the click target is outside of its element, and trigger the provided action/callback if so.
5156

52-
If the click target cannot be found in the document (probably because it has been deleted before `ember-click-outside` detected the click), no action/callback is triggered, since we cannot check if it is inside or outside of the element.
57+
If the click target cannot be found in the document (probably because it has been removed before `ember-click-outside` detected the click), no action/callback is triggered, since we cannot check if it is inside or outside of the element.
58+
59+
60+
Contributing
61+
------------------------------------------------------------------------------
62+
63+
See the [Contributing](CONTRIBUTING.md) guide for details.
64+
65+
66+
License
67+
------------------------------------------------------------------------------
68+
69+
This project is licensed under the [MIT License](LICENSE.md).

app/modifiers/on-click-outside.js

-1
This file was deleted.

config/ember-cli-update.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"schemaVersion": "1.0.0",
3+
"packages": [
4+
{
5+
"name": "@embroider/addon-blueprint",
6+
"version": "1.4.1",
7+
"blueprints": [
8+
{
9+
"name": "@embroider/addon-blueprint",
10+
"isBaseBlueprint": true,
11+
"options": [
12+
"--pnpm",
13+
"--ci-provider=github"
14+
]
15+
}
16+
]
17+
}
18+
]
19+
}

config/environment.js

-5
This file was deleted.

0 commit comments

Comments
 (0)