Skip to content

Commit 4a7489e

Browse files
authored
Merge pull request #136 from volldigital/master
Update and refactor code, so that it works nicely from ember 4.12 onwards (at least up to 5.12)
2 parents 7e26e6c + 33d464d commit 4a7489e

Some content is hidden

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

51 files changed

+33456
-11965
lines changed

.bowerrc

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

.ember-cli

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55

66
Setting `disableAnalytics` to true will prevent any data from being sent.
77
*/
8-
"disableAnalytics": false
8+
"disableAnalytics": false,
9+
10+
/**
11+
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12+
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
13+
*/
14+
"isTypeScriptProject": false
915
}

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@
88

99
# dependencies
1010
/bower_components/
11+
/node_modules/
1112

1213
# misc
1314
/coverage/
1415
!.*
16+
.*/
17+
.eslintcache
1518

1619
# ember-try
1720
/.node_modules.ember-try/
1821
/bower.json.ember-try
22+
/npm-shrinkwrap.json.ember-try
1923
/package.json.ember-try
24+
/package-lock.json.ember-try
25+
/yarn.lock.ember-try

.eslintrc.js

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,60 @@
1+
'use strict';
2+
13
module.exports = {
24
root: true,
5+
parser: '@babel/eslint-parser',
36
parserOptions: {
4-
ecmaVersion: 2017,
5-
sourceType: 'module'
7+
ecmaVersion: 'latest',
8+
sourceType: 'module',
9+
requireConfigFile: false,
10+
babelOptions: {
11+
plugins: [
12+
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
13+
],
14+
},
615
},
7-
plugins: [
8-
'ember'
9-
],
10-
extends: [
11-
'eslint:recommended',
12-
'plugin:ember/recommended'
13-
],
16+
plugins: ['ember'],
17+
extends: ['eslint:recommended', 'plugin:ember/recommended'],
1418
env: {
15-
browser: true
19+
browser: true,
1620
},
17-
rules: {
21+
globals: {
22+
Dropzone: true,
1823
},
1924
overrides: [
2025
// node files
2126
{
2227
files: [
23-
'.template-lintrc.js',
24-
'ember-cli-build.js',
25-
'index.js',
26-
'testem.js',
27-
'blueprints/*/index.js',
28-
'config/**/*.js',
29-
'tests/dummy/config/**/*.js'
28+
'./.eslintrc.js',
29+
'./.prettierrc.js',
30+
'./.stylelintrc.js',
31+
'./.template-lintrc.js',
32+
'./ember-cli-build.js',
33+
'./index.js',
34+
'./testem.js',
35+
'./blueprints/*/index.js',
36+
'./config/**/*.js',
37+
'./tests/dummy/config/**/*.js',
3038
],
3139
excludedFiles: [
3240
'addon/**',
3341
'addon-test-support/**',
3442
'app/**',
35-
'tests/dummy/app/**'
43+
'tests/dummy/app/**',
3644
],
3745
parserOptions: {
3846
sourceType: 'script',
39-
ecmaVersion: 2015
4047
},
4148
env: {
4249
browser: false,
43-
node: true
50+
node: true,
4451
},
45-
plugins: ['node'],
46-
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
47-
// add your custom rules and overrides for node files here
48-
})
49-
}
50-
]
52+
extends: ['plugin:n/recommended'],
53+
},
54+
{
55+
// Test files:
56+
files: ['tests/**/*-test.{js,ts}'],
57+
extends: ['plugin:qunit/recommended'],
58+
},
59+
],
5160
};

.github/workflows/ci.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request: {}
9+
10+
concurrency:
11+
group: ci-${{ github.head_ref || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test:
16+
name: "Tests"
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Install Node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: 14.x
26+
cache: npm
27+
- name: Install Dependencies
28+
run: npm ci
29+
- name: Lint
30+
run: npm run lint
31+
- name: Run Tests
32+
run: npm run test:ember
33+
34+
floating:
35+
name: "Floating Dependencies"
36+
runs-on: ubuntu-latest
37+
timeout-minutes: 10
38+
39+
steps:
40+
- uses: actions/checkout@v3
41+
- uses: actions/setup-node@v3
42+
with:
43+
node-version: 14.x
44+
cache: npm
45+
- name: Install Dependencies
46+
run: npm install --no-shrinkwrap
47+
- name: Run Tests
48+
run: npm run test:ember
49+
50+
try-scenarios:
51+
name: ${{ matrix.try-scenario }}
52+
runs-on: ubuntu-latest
53+
needs: "test"
54+
timeout-minutes: 10
55+
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
try-scenario:
60+
- ember-lts-4.4
61+
- ember-lts-4.8
62+
- ember-release
63+
- ember-beta
64+
- ember-canary
65+
- embroider-safe
66+
- embroider-optimized
67+
68+
steps:
69+
- uses: actions/checkout@v3
70+
- name: Install Node
71+
uses: actions/setup-node@v3
72+
with:
73+
node-version: 14.x
74+
cache: npm
75+
- name: Install Dependencies
76+
run: npm ci
77+
- name: Run Tests
78+
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@
1212
/.eslintignore
1313
/.eslintrc.js
1414
/.gitignore
15+
/.prettierignore
16+
/.prettierrc.js
17+
/.stylelintignore
18+
/.stylelintrc.js
1519
/.template-lintrc.js
1620
/.travis.yml
1721
/.watchmanconfig
1822
/bower.json
1923
/config/ember-try.js
24+
/CONTRIBUTING.md
2025
/ember-cli-build.js
2126
/testem.js
2227
/tests/

.prettierignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
/vendor/
4+
5+
# compiled output
6+
/dist/
7+
/tmp/
8+
9+
# dependencies
10+
/bower_components/
11+
/node_modules/
12+
13+
# misc
14+
/coverage/
15+
!.*
16+
.eslintcache
17+
18+
# ember-try
19+
/.node_modules.ember-try/
20+
/bower.json.ember-try
21+
/package.json.ember-try

.prettierrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
module.exports = {
4+
overrides: [
5+
{
6+
files: '*.{js,ts}',
7+
options: {
8+
singleQuote: true,
9+
},
10+
},
11+
],
12+
};

.stylelintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# unconventional files
2+
/blueprints/*/files/
3+
4+
# compiled output
5+
/dist/
6+
7+
# addons
8+
/.node_modules.ember-try/

.stylelintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
5+
};

0 commit comments

Comments
 (0)