Skip to content

Commit

Permalink
Convert to addon v2: part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Anastasia Plutalova committed Mar 1, 2022
1 parent be9543f commit e9dc450
Show file tree
Hide file tree
Showing 135 changed files with 438 additions and 246 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ jobs:
cache: yarn
- name: Install Dependencies
run: until yarn install --frozen-lockfile; do echo "Retrying yarn"; done
- name: Lint
- name: Lint Addon
run: yarn lint
working-directory: addon
- name: Lint Test App
run: yarn lint
working-directory: test-app
- name: Run Tests
run: yarn test:ember
working-directory: test-app

floating:
name: "Floating Dependencies"
Expand All @@ -46,6 +51,7 @@ jobs:
run: until yarn install --no-lockfile; do echo "Retrying yarn"; done
- name: Run Tests
run: yarn test:ember
working-directory: test-app

try-scenarios:
name: ${{ matrix.try-scenario }}
Expand Down Expand Up @@ -80,3 +86,4 @@ jobs:
run: until yarn install --frozen-lockfile; do echo "Retrying yarn"; done
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
working-directory: test-app
30 changes: 3 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
tests/dummy/lib/**/node_modules
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
node_modules
yarn-error.log
.DS_Store
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

## Running the dummy application
## Running the test-app application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
* 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/).
22 changes: 22 additions & 0 deletions addon/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

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

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
3 changes: 0 additions & 3 deletions .eslintrc.js → addon/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ module.exports = {
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
'./tests/dummy/lib/*/ember-cli-build.js',
'./tests/dummy/lib/*/index.js',
],
parserOptions: {
sourceType: 'script',
Expand Down
26 changes: 26 additions & 0 deletions addon/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
61 changes: 61 additions & 0 deletions addon/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "ember-engines-router-service",
"version": "0.3.0",
"description": "Provides the Router service for ember-engines.",
"keywords": [
"ember-addon"
],
"repository": {
"type": "git",
"url": "git+https://github.com/villander/ember-engines-router-service.git"
},
"authors": [
"Michael Villander"
],
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix"
},
"dependencies": {
"ember-cli-babel": "^7.26.10"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"ember-cli-babel": "^7.26.10",
"ember-template-lint": "^3.15.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1"
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"changelog": {
"repo": "villander/ember-engines-router-service",
"labels": {
"breaking": ":boom: Breaking Change",
"enhancement": ":rocket: Enhancement",
"bug": ":bug: Bug Fix",
"documentation": ":memo: Documentation",
"internal": ":house: Internal"
}
},
"ember": {
"edition": "octane"
}
}
103 changes: 5 additions & 98 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,100 +1,7 @@
{
"name": "ember-engines-router-service",
"version": "0.3.0",
"description": "Provides the Router service for ember-engines.",
"keywords": [
"ember-addon"
],
"repository": {
"type": "git",
"url": "git+https://github.com/villander/ember-engines-router-service.git"
},
"authors": [
"Michael Villander"
],
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build --environment=production",
"changelog": "lerna-changelog",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "npm-run-all lint test:*",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"ember-cli-babel": "^7.26.10"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.6.0",
"@embroider/test-setup": "^0.48.1",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"eager-blog": "link:./tests/dummy/lib/eager-blog",
"ember-auto-import": "^2.4.0",
"ember-blog": "link:./tests/dummy/lib/ember-blog",
"ember-chat": "link:./tests/dummy/lib/ember-chat",
"ember-cli": "~3.28.5",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-htmlbars": "^5.7.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-engines": "^0.8.5",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.8",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^3.15.0",
"ember-try": "^1.4.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0",
"lerna-changelog": "^1.0.1",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"qunit-dom": "^1.6.0",
"webpack": "^5.68.0"
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"changelog": {
"repo": "villander/ember-engines-router-service",
"labels": {
"breaking": ":boom: Breaking Change",
"enhancement": ":rocket: Enhancement",
"bug": ":bug: Bug Fix",
"documentation": ":memo: Documentation",
"internal": ":house: Internal"
}
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"configPath": "tests/dummy/config"
}
"private": true,
"workspaces": [
"addon",
"test-app"
]
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .eslintignore → test-app/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
/bower.json.ember-try
/package.json.ember-try

/tests/dummy/lib/*/node_modules/
/test-app/node_modules/
55 changes: 55 additions & 0 deletions test-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
},
},
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
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',
'./test-app/config/**/*.js',
'./test-app/lib/*/ember-cli-build.js',
'./test-app/lib/*/index.js',
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
27 changes: 27 additions & 0 deletions test-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
test-app/node_modules
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
File renamed without changes.
Loading

0 comments on commit e9dc450

Please sign in to comment.