Skip to content

Commit

Permalink
Sync test-app blueprint with [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Astapov committed Aug 8, 2023
1 parent 8bcfb2f commit 719033a
Show file tree
Hide file tree
Showing 25 changed files with 2,588 additions and 591 deletions.
2,752 changes: 2,335 additions & 417 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions test-app/.ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
"isTypeScriptProject": true
}
12 changes: 0 additions & 12 deletions test-app/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# 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
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
32 changes: 13 additions & 19 deletions test-app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@ module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
},
ecmaVersion: 'latest',
},
plugins: ['@typescript-eslint', 'ember'],
plugins: ['ember', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
Expand All @@ -22,11 +17,21 @@ module.exports = {
},
rules: {},
overrides: [
// ts files
{
files: ['**/*.ts'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {},
},
// node files
{
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
Expand All @@ -35,22 +40,11 @@ module.exports = {
'./lib/*/index.js',
'./server/**/*.js',
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
// We *want* to use traditional require statements in Node `.js` files.
'@typescript-eslint/no-var-requires': 'off',
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off',
},
extends: ['plugin:n/recommended'],
},
{
// test files
Expand Down
9 changes: 1 addition & 8 deletions test-app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/declarations/

# 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
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
Expand Down
14 changes: 1 addition & 13 deletions test-app/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/
.*/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
9 changes: 8 additions & 1 deletion test-app/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
'use strict';

module.exports = {
singleQuote: true,
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
8 changes: 8 additions & 0 deletions test-app/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/
5 changes: 5 additions & 0 deletions test-app/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
2 changes: 1 addition & 1 deletion test-app/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
57 changes: 57 additions & 0 deletions test-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# test-app

This README outlines the details of collaborating on this Ember application.
A short introduction of this app could easily go here.

## Prerequisites

You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/)
* [Yarn](https://yarnpkg.com/)
* [Ember CLI](https://cli.emberjs.com/release/)
* [Google Chrome](https://google.com/chrome/)

## Installation

* `git clone <repository-url>` this repository
* `cd test-app`
* `yarn install`

## Running / Development

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

### Code Generators

Make use of the many generators for code, try `ember help generate` for more details

### Running Tests

* `ember test`
* `ember test --server`

### Linting

* `yarn lint`
* `yarn lint:fix`

### Building

* `ember build` (development)
* `ember build --environment production` (production)

### Deploying

Specify what it takes to deploy your app.

## Further Reading / Useful Links

* [ember.js](https://emberjs.com/)
* [ember-cli](https://cli.emberjs.com/release/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
File renamed without changes.
2 changes: 1 addition & 1 deletion test-app/app/config/environment.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Type declarations for
* import config from 'my-app/config/environment'
* import config from 'test-app/config/environment'
*/
declare const config: {
environment: string;
Expand Down
2 changes: 1 addition & 1 deletion test-app/app/router.js → test-app/app/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export default class Router extends EmberRouter {
}

Router.map(function () {
/* intentionally empty: nothing to do in this test! */
// Add route declarations here
});
13 changes: 7 additions & 6 deletions test-app/app/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
/* THE FOLLOWING IS USED FOR INTEGRATION TESTS, DO NOT REMOVE */

/* initial state */
.example-enter, .example-leave-to {
.example-enter,
.example-leave-to {
opacity: 0;
}

/* final state */
.example-enter-to, .example-leave {
.example-enter-to,
.example-leave {
opacity: 1;
}

/* easings */
.example-enter-active, .example-leave-active {
transition: opacity .5s ease-in;
.example-enter-active,
.example-leave-active {
transition: opacity 0.5s ease-in;
}


.opacity-0 {
opacity: 0;
}
Expand All @@ -24,7 +26,6 @@
opacity: 100;
}


.duration-500 {
transition-duration: 500ms;
}
Expand Down
4 changes: 3 additions & 1 deletion test-app/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "4.8.0",
"version": "5.2.0-beta.0",
"blueprints": [
{
"name": "app",
Expand All @@ -12,6 +12,8 @@
"isBaseBlueprint": true,
"options": [
"--pnpm",
"--ci-provider=github",
"--typescript",
"--no-welcome"
]
}
Expand Down
33 changes: 15 additions & 18 deletions test-app/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,45 +36,42 @@ module.exports = async function () {
},
},
{
name: 'ember-release',
name: 'ember-lts-4.8',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release'),
'ember-source': '~4.8.0',
},
},
},
{
name: 'ember-beta',
name: 'ember-lts-4.12',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta'),
'ember-source': '~4.12.0',
},
},
},
{
name: 'ember-canary',
name: 'ember-release',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
'ember-source': await getChannelURL('release'),
},
},
},
{
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'application-template-wrapper': true,
'default-async-observers': false,
'template-only-glimmer-components': false,
}),
},
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': '~3.28.0',
'@ember/test-helpers': '2.7.0',
'ember-source': await getChannelURL('beta'),
},
ember: {
edition: 'classic',
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
},
},
},
Expand Down
1 change: 1 addition & 0 deletions test-app/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = function (environment) {
rootURL: '/',
locationType: 'history',
EmberENV: {
EXTEND_PROTOTYPES: false,
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
Expand Down
2 changes: 2 additions & 0 deletions test-app/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ if (process.env.USE_TEST_WAITERS !== undefined) {

module.exports = function (defaults) {
const app = new EmberApp(defaults, {
'ember-cli-babel': { enableTypeScriptTransform: true },

autoImport: {
watchDependencies: ['ember-css-transitions'],
},
Expand Down
Loading

0 comments on commit 719033a

Please sign in to comment.