Skip to content

Commit

Permalink
Merge pull request #532 from ef4/v2-addon
Browse files Browse the repository at this point in the history
Update for Ember 4 and Embroider
  • Loading branch information
ef4 authored Jan 21, 2022
2 parents 19366ea + b7e0e3d commit fff89b6
Show file tree
Hide file tree
Showing 83 changed files with 9,020 additions and 4,762 deletions.
12 changes: 0 additions & 12 deletions .dependabot/config.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .ember-cli

This file was deleted.

8 changes: 7 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@

# compiled output
/dist/
/tmp/
/test-app/dist
/test-app/tmp

# dependencies
/bower_components/
/node_modules/
/test-app/node_modules

# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
Expand Down
44 changes: 15 additions & 29 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,44 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
legacyDecorators: true,
},
},
plugins: ['ember', 'prettier'],
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended'
'plugin:prettier/recommended',
],
env: {
browser: true
},
rules: {
'ember/no-jquery': 'error',
'no-var': 'error',
'prefer-const': 'error',
'object-shorthand': 'error'
browser: true,
},
rules: {},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
'addon-main.js',
],
parserOptions: {
sourceType: 'script'
sourceType: 'script',
},
env: {
browser: false,
node: true
node: true,
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
extends: ['plugin:node/recommended'],
},
],
};
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Node CI

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v2
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
- name: lint
run: yarn lint
- name: test
run: yarn test:ember
- id: set-matrix
run: echo "::set-output name=matrix::$(yarn --silent scenario-tester list --files ./scenarios.js --matrix 'yarn qunit ./scenarios.js --filter %s:')"
working-directory: test-app

compat-scenarios:
needs: test
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{fromJson(needs.test.outputs.matrix)}}
steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-v2
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --no-lockfile
- name: test
run: ${{ matrix.command }}
working-directory: test-app
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/dist
/test-app/dist/
/test-app/tmp/

# dependencies
/bower_components/
/node_modules/
/test-app/node_modules

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
Expand All @@ -21,3 +25,5 @@
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try

.DS_Store
16 changes: 8 additions & 8 deletions .npmignore → .prettierignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/
*.tgz

# dependencies
/bower_components/
/node_modules/

# misc
.*
/bower.json
/config/ember-try.js
/ember-cli-build.js
/testem.js
/tests/
/yarn.lock
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
Expand Down
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
singleQuote: true,
};
3 changes: 2 additions & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

module.exports = {
extends: 'recommended'
extends: 'octane',
rules: {},
};
64 changes: 0 additions & 64 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
3 changes: 0 additions & 3 deletions .watchmanconfig

This file was deleted.

26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# How To Contribute

## Installation

* `git clone <repository-url>`
* `cd ember-pikaday`
* `yarn install`

## Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Running the test-app application

* `ember serve`
* Visit the test-app application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
Loading

0 comments on commit fff89b6

Please sign in to comment.