Skip to content

Commit

Permalink
feat: ember-cli-update (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidojw authored Apr 8, 2022
1 parent 2c1177e commit 06eaa14
Show file tree
Hide file tree
Showing 29 changed files with 5,364 additions and 1,794 deletions.
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# unconventional js
/blueprints/*/files/
/vendor/
/bin/

# compiled output
/dist/
Expand All @@ -14,8 +13,12 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try

/bin/
9 changes: 3 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module.exports = {
camelcase: ['error', { properties: 'always' }],
'ember/avoid-leaking-state-in-ember-objects': 0,
'ember/use-brace-expansion': 0,
'object-curly-spacing': ['error', 'always'],
'ember/no-controller-access-in-routes': 1,
'ember/no-classic-classes': 1,
'ember/no-actions-hash': 1,
Expand All @@ -36,11 +35,6 @@ module.exports = {
'always',
{ exceptAfterSingleLine: true },
],
'no-multiple-empty-lines': [2, { max: 1, maxBOF: 0, maxEOF: 0 }],
'padded-blocks': [2, 'never', { allowSingleLineBlocks: true }],
},
globals: {
moment: true,
},
overrides: [
// node files
Expand Down Expand Up @@ -79,4 +73,7 @@ module.exports = {
extends: ['plugin:qunit/recommended'],
},
],
globals: {
moment: true,
},
};
51 changes: 0 additions & 51 deletions .github/renovate.json

This file was deleted.

91 changes: 91 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"extends": [
"config:base",
":disableDependencyDashboard",
":semanticCommits",
":semanticCommitTypeAll(chore)",
"helpers:pinGitHubActionDigests",
"docker:enableMajor"
],
"labels": ["dependencies"],
"prConcurrentLimit": 0,
"rangeStrategy": "bump",
"timezone": "Europe/Amsterdam",
// These dependencies are handled by ember-cli-update.
"ignoreDeps": [
"@ember/optional-features",
"@glimmer/component",
"@glimmer/tracking",
"babel-eslint",
"broccoli-asset-rev",
"ember-auto-import",
"ember-cli-babel",
"ember-cli-dependency-checker",
"ember-cli-htmlbars",
"ember-cli-inject-live-reload",
"ember-cli-sri",
"ember-cli-uglify",
"ember-data",
"ember-fetch",
"ember-load-initializers",
"ember-maybe-import-regenerator",
"ember-page-title",
"ember-qunit",
"ember-resolver",
"ember-source",
"ember-template-lint",
"eslint",
"eslint-plugin-ember",
"eslint-plugin-node",
// ember-cli's server blueprint is responsible for this.
"glob",
// ember-cli's http-proxy blueprint is responsible for this.
"http-proxy",
"loader.js",
// ember-cli's server blueprint is responsible for this.
"morgan",
"npm-run-all",
"qunit-dom"
],
"packageRules": [
{
"extends": ["schedule:weekly"],
"matchManagers": ["npm"],
"matchPackagePatterns": ["*"],
"matchUpdateTypes": ["minor", "patch"],
"excludePackageNames": ["ember-cli", "yarn"],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch"
},
{
"matchPackageNames": ["danlynn/ember-cli", "ember-cli"],
"groupName": "ember-cli",
"separateMinorPatch": true,
"draftPR": true,
"prBodyNotes": "{{#unless isPatch}}### Upgrade Instructions\n* Wait until both `danlynn/ember-cli` and `ember-cli` have the same update\n* Then follow this guide: https://cli.emberjs.com/release/basic-use/upgrading/#upgradinganemberappitself\n* Finally, make sure any package that was added to `package.json` by this process is added to `ignoreDeps` in [`renovate.json5`](https://github.com/csvalpha/amber-ui/blob/staging/.github/renovate.json5){{/unless}}"
},
{
"matchPackageNames": ["danlynn/ember-cli", "ember-cli"],
"matchUpdateTypes": ["patch"],
"draftPR": false
},
{
"description": "faker v5.5.3 -> v6.6.6 update removed all its source.",
"matchPackageNames": ["faker"],
"enabled": false
},
{
"matchManagers": ["npm"],
"matchDepTypes": ["engines"],
"enabled": false
},
{
"matchManagers": ["nvm"],
"matchUpdateTypes": ["major"],
"enabled": false
}
],
"docker-compose": {
"enabled": false
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
.npmrc
Expand Down
4 changes: 0 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@
/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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM danlynn/ember-cli:3.28.2@sha256:fe88d8ecf88086b77ef9a21b5ce523c8f1ae5402df5e25632bd3390be92a75a7 AS base
FROM danlynn/ember-cli:3.28.5@sha256:e51e83121cefac0ba13c2a39f60623532c99386e418f18f4d03b9f554058a6ae AS base

ARG DEPLOY_TARGET='production'
ARG BUILD_HASH='unknown'
Expand Down
35 changes: 0 additions & 35 deletions MODULE_REPORT.md

This file was deleted.

64 changes: 20 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Alpha AMBER UI
# amber-ui

[![Continuous Integration](https://github.com/csvalpha/amber-ui/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/csvalpha/amber-ui/actions/workflows/continuous-integration.yml)
[![Continuous Delivery](https://github.com/csvalpha/amber-ui/actions/workflows/continuous-delivery.yml/badge.svg)](https://github.com/csvalpha/amber-ui/actions/workflows/continuous-delivery.yml)
Expand All @@ -7,43 +7,32 @@

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

- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/) (with NPM, see `.nvmrc`, install preferably with [nvm](https://github.com/creationix/nvm#install-script))
- [Yarn](https://yarnpkg.com/) (Alternative to NPM. Not strictly required, but uses version locking and is much faster)
- [Ember CLI](https://www.ember-cli.com/): `yarn global add ember-cli` (or `npm install -g ember-cli`)
* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/)
* [Yarn](https://yarnpkg.com/)
* [Ember CLI](https://www.ember-cli.com/)
* [Google Chrome](https://google.com/chrome/)

## Installation

- `git clone <repository-url>` this repository
- change into the new directory
- `yarn add` (or `npm install`)
* `git clone <repository-url>` this repository
* `cd amber-ui`
* `yarn install`

## Running / Development

- `ember server` or `npm start`
- Visit your app at [http://localhost:4200](http://localhost:4200).
* `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.
Make use of the many generators for code, try `ember help generate` for more details

## Tests
### Running Tests

The UI is tested using multiple types of test: unit, integration and acceptance.

### Running

When executing tests, the code style is checked using [XO](https://github.com/sindresorhus/xo), while the tests are
executed using ember. These two commands are combined in the `npm test` command.

To execute the tests:

npm test

It is also possible to run only the ember tests in a browser (chrome). This allows to see what is going on, and for easier
debugging:

ember exam --server
* `ember test`
* `ember test --server` to run tests after every file change

### Test data

Expand All @@ -55,28 +44,15 @@ and randomized using Faker.
To preview generated data in the browser, set `ENV['ember-cli-mirage'].enabled` to `true` for
development in `config/environment.js`. The content generated for development is described in `mirage/scenarios/default.js`.

#### XO on Windows

Make sure you are using LF as line ending instead of CRLF. In WebStorm this is done by selecting the `app` directory,
and change the line ending via `File` > `Line Separators` > `LF Unix & OS X (\n)`.
Also change this in `File` > `Settings` > `Editor` > `Code Style` > `Line seperator (for new files)`.

Note: this should be configured automatically using `.editorconfig`.

### Linting

- `yarn lint:hbs` (lint hbs files)
- `yarn lint` (lint script and style files)

For auto fix run

- `yarn jsfix`
- `yarn stylefix`
* `yarn lint`
* `yarn lint:fix`

### Building

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

### Deploying

Expand Down
2 changes: 0 additions & 2 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ if (config.environment === 'production') {

export default class App extends Application {
modulePrefix = config.modulePrefix;

podModulePrefix = config.podModulePrefix;

Resolver = Resolver;
}

Expand Down
3 changes: 1 addition & 2 deletions app/router.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import config from 'alpha-amber/config/environment';
import EmberRouter from '@ember/routing/router';
import config from 'alpha-amber/config/environment';

export default class Router extends EmberRouter {
location = config.locationType;

rootURL = config.rootURL;

constructor() {
Expand Down
21 changes: 21 additions & 0 deletions config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
"name": "ember-cli",
"version": "3.28.5",
"blueprints": [
{
"name": "app",
"outputRepo": "https://github.com/ember-cli/ember-new-output",
"codemodsSource": "ember-app-codemods-manifest@1",
"isBaseBlueprint": true,
"options": [
"--yarn",
"--no-welcome"
]
}
]
}
]
}
Loading

0 comments on commit 06eaa14

Please sign in to comment.