Skip to content

Commit

Permalink
Upgrade app to Ember 3.22 (#206)
Browse files Browse the repository at this point in the history
* Update lint/test related packages

* Update remark/md linting packages

* Update ember addons

* Add alex disable comments to fix Alex linting errors

* Update Ember related packages

* v3.16.0...v3.22.0

* Fix bindings for Netlify pinned node version

* Fix Netlify node bindings - attempt #2

Co-authored-by: maxwondercorn <[email protected]>
  • Loading branch information
maxwondercorn and maxwondercorn authored Oct 22, 2020
1 parent 0d10695 commit fe580fb
Show file tree
Hide file tree
Showing 22 changed files with 6,381 additions and 6,246 deletions.
11 changes: 4 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ module.exports = {
env: {
browser: true
},
rules: {
'ember/no-jquery': 'error'
},
rules: {},
overrides: [
// node files
{
Expand All @@ -44,13 +42,12 @@ module.exports = {
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'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off'
})
}
}
]
};
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
node_js:
- "10"

dist: trusty
dist: xenial

addons:
chrome: stable
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ When in doubt, test your writing in [http://www.hemingwayapp.com/](http://www.he
Write in a welcoming, approachable way. Think of how you would explain something out loud. That’s the preferred tone - conversational and readable. Short sentences are good. Remember that many developers, this is their first framework and English is not their first language.

#### Audience of beginners

<!-- alex disable simple -->
The audience is a developer who knows enough to have built a simple HTML/JavaScript (or JQuery) app. Explanations should appeal to both developers who are learning Ember as their first framework, but not be useless to people who know another framework.

#### Scope
Expand All @@ -70,5 +70,5 @@ Avoid voice altogether whenever you can. When some voice is needed, use first pe
- Best: “There is an entire ecosystem of adapters that allows Ember apps to talk to different types of servers …”

#### Inclusive language
<!--alex disable her-him-->
<!--alex disable her-him obviously -->
“They/Them” is used in place of him/he/she/her/etc. Do not use gender in code examples. Avoid terms like “just, simply, obviously” etc.
2 changes: 1 addition & 1 deletion app/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import config from '@ember-learn/cli-guides/config/environment';

export default class App extends Application {
modulePrefix = config.modulePrefix;
Expand Down
2 changes: 1 addition & 1 deletion app/router.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
import config from '@ember-learn/cli-guides/config/environment';

export default class Router extends EmberRouter {
location = config.locationType;
Expand Down
2 changes: 1 addition & 1 deletion 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": "3.16.0",
"version": "3.22.0",
"blueprints": [
{
"name": "app",
Expand Down
2 changes: 1 addition & 1 deletion config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const browsers = [
'last 1 Safari versions'
];

const isCI = !!process.env.CI;
const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
Expand Down
1 change: 1 addition & 0 deletions guides/advanced-use/asset-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = {

(If these values look familiar, they're the same exact values used by the popular [Autoprefixer](https://github.com/postcss/autoprefixer) project.)

<!-- alex disable simply -->
If you need more fine-grained customization over the way that `babel-preset-env` transforms your code,
simply set any of the options found [here](https://github.com/babel/babel-preset-env#options) on your application's `babel` hash in `ember-cli-build.js`.

Expand Down
2 changes: 2 additions & 0 deletions guides/advanced-use/blueprints.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ installing blueprint
create blueprints/foo-test/index.js
```

<!-- alex disable easy -->
Blueprints in your project’s directory take precedence over those packaged with Ember CLI. This makes it easy to override the built-in blueprints by generating one with the same name.

### Blueprint Structure

<!-- alex disable simple -->
Blueprints follow a simple structure. Let’s use the built-in helper blueprint as an example:

```shell
Expand Down
3 changes: 2 additions & 1 deletion guides/advanced-use/debugging.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- alex disable just -->
For most Ember applications, Ember CLI "just works". Run `ember server` in your Terminal and you get
a LiveReload development server at `http://localhost:4200`. Run `ember build`, and you get a `dist/`
directory with compiled assets ready to be deployed to your production server.
Expand Down Expand Up @@ -33,7 +34,7 @@ set a `debugger` at the top of `ember-cli-build.js`, and then run:
```bash
node inspect ./node_modules/.bin/ember build
```

<!-- alex disable simply -->
You'll first see the build command pause at the start of the program. You can tell it to continue
by typing `cont` (or simply `c`). Once the program begins executing, it will stop at any `debugger`
statements it finds. You can then enter a REPL, by typing `repl`.
Expand Down
1 change: 1 addition & 0 deletions guides/advanced-use/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Ember uses Broccoli for the build process. Broccoli is an independent project th

For example, if an app has content in the form of Markdown files that need to be turned into HTML during the build, it could be done with Broccoli. This very app you're reading content on right now follows that architecture, and the work was turned into a [Broccoli plugin](https://github.com/stonecircle/broccoli-static-site-json).

<!-- alex disable just -->
Just like there are Ember community addons, there are a variety of Broccoli plugins too! For more information please visit plugins section of [Broccoli official website](https://broccoli.build/about.html#plugins)

## Babel
Expand Down
2 changes: 1 addition & 1 deletion guides/appendix/dev-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ to enable it inside those projects.
### Sublime Text
<!-- alex disable simply -->
If you are using [Sublime Text](http://www.sublimetext.com) with Ember CLI,
by default it will try to index all files in your `tmp` directory for its
GoToAnything functionality. This will cause your computer to come to a
Expand Down
1 change: 1 addition & 0 deletions guides/basic-use/assets-and-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ In general, when people say "assets", they mean things that the developer has ad

Here are the most common places:

<!-- alex disable just -->
- Every Ember app has a file called `package.json` that lists node modules used by the app.
The code itself goes in `node_modules` during `npm install`, just like in many non-Ember JavaScript projects
- The `vendor` directory, which is a common home for third-party JavaScript that is copied and pasted in
Expand Down
1 change: 1 addition & 0 deletions guides/basic-use/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ ember build [options]

`ember build` takes all of your app files and turns them into a bundle that is minified and transpiled into browser-ready JavaScript code, styles, and HTML. The bundled files go into a directory called `dist`. This bundle is what can be deployed to a server. By default, the `build` command uses the `development` environment configuration, which is not optimized for production.

<!-- alex disable easy -->
Although you can upload the built files to a server yourself, many Ember projects use a community addon called [ember-cli-deploy](https://github.com/ember-cli-deploy/ember-cli-deploy) to get their apps into production. `ember-cli-deploy` has a plugin system to make it easy to deploy to many cloud vendors. Search [Ember Observer for "deploy"](https://emberobserver.com/?query=deploy) to browse available options.

Ember apps can be built with only three environments: development, production, and testing.
Expand Down
3 changes: 3 additions & 0 deletions guides/basic-use/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ The best way to get started using ember-cli-deploy is to visit the [documentatio
Some hosting service providers offer automated deployment in other ways.
For example, Heroku has a build pack and CLI of their own that provides a zero-config deployment! The step-by-step examples are available at [https://www.heroku.com/emberjs](https://www.heroku.com/emberjs)

<!-- alex disable easy -->
Do you know of any other hosting services that make it easy to deploy Ember apps?
Please [open an issue](https://github.com/ember-learn/cli-guides-source) for this Guide.

## Common deployment configurations

<!-- alex disable just -->
Compared to developing an app locally, there are some options to consider when an app is in deployment. Some apps may not need to configure any of these options, but here are just a few of the most common examples to help you get started. For more details, see the [Advanced Use](../../advanced-use/) section of the CLI guides.

### Configuring `rootURL`
Expand Down Expand Up @@ -130,6 +132,7 @@ The use of HTTPS certificates is a best practice for web security and profession

Plain old HTTP sites are likely to show your users security warnings and they are vulnerable to man-in-the-middle attacks. HTTPS certificates are available at no cost from many identity and hosting providers. However, even if you have an HTTPS certificate, you will still need a way to redirect any users who visit `http://your-ember-app.com`, for example.

<!-- alex disable simple -->
The following is a simple http-to-https redirect using [nginx](https://nginx.org/en/). Don't forget to include your ssl keys in your config.

First, make a production build of your app. The results will be saved in the `dist` directory:
Expand Down
2 changes: 2 additions & 0 deletions guides/basic-use/using-addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ For example, these community-authored addons bring in familiar functionality fro

- Stylesheet tooling like [ember-cli-sass](https://www.emberobserver.com/addons/ember-cli-sass), which provides [Sass](https://sass-lang.com/) as an alternative to standard CSS.
- JavaScript utilities like [ember-moment](https://www.emberobserver.com/addons/ember-moment), which offers some Ember conveniences to the base [moment library](https://www.npmjs.com/package/moment).

<!-- alex disable just -->
- Full UI frameworks and design kits like [ember-bootstrap](https://www.emberobserver.com/addons/ember-bootstrap), [semantic-ui-ember](https://www.emberobserver.com/addons/semantic-ui-ember), and [ember-paper](https://www.emberobserver.com/addons/ember-paper). These offer easier, more reliable, more performant functionality than just using the npm packages directly.
- TypeScript support through [ember-cli-typescript](https://github.com/typed-ember/ember-cli-typescript).
- Charting libraries like [ember-d3](https://github.com/ivanvanderbyl/ember-d3).
Expand Down
1 change: 1 addition & 0 deletions guides/writing-addons/addon-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ In this case, Ember CLI will incorporate these addons along with the other depen

## Dummy app dependencies

<!-- alex disable easy -->
In addons, the `dummy app` is really the project and uses the root level `package.json` file for dependencies. The dummy app automatically treats the containing addon as a dependency without adding it to the `package.json`. This makes it easy to use the dummy app for testing and documenting your addon's usage.


Expand Down
2 changes: 2 additions & 0 deletions guides/writing-addons/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ After you install the addon with `ember install ember-qunit-assert-helpers`, you

## Documenting the deprecation

<!-- alex disable clearly easy -->
There are a few different ways to document the deprecation.
First, and most importantly, make sure your deprecation warning itself is easy to understand, clearly states which addon it comes from, and has brief instructions for resolving the deprecation.

<!-- alex disable just -->
You should also add information to your `README`, a `CHANGELOG`, or make a dedicated `DEPRECATIONS.md` file that you can link to in your deprecation warning.
For larger projects, you may even want to have a separate section in your documentation that is just for deprecations.
Keep in mind that you don't want your library to look like it is swimming in deprecations, so avoid notes about deprecation caveats in your new-user-facing materials, like quick start guides.
Expand Down
2 changes: 2 additions & 0 deletions guides/writing-addons/intro-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Let's say that our addon should wrap some content in a button tag. The addon tem
<button>{{buttonLabel}}</button>
```

<!-- alex disable just -->
Our goal is to be able to pass the `buttonLabel` value to the addon, just like we'd pass it to a normal component within an app:

```handlebars {data-filename=my-application-name/templates/my-template.hbs}
Expand Down Expand Up @@ -71,6 +72,7 @@ We should now see our addon in action!

### Making a UI component available in block form

<!-- alex disable simple -->
In an Ember app, components can be used in ["simple" or "block" form](https://guides.emberjs.com/release/components/wrapping-content-in-a-component/). Addon templates have the same capabilities. The simple form allows data objects or configuration values to be passed to the addon. The block form allows a developer to pass in their own template, content, and interactivity.

In an Ember app, a block style component uses the `{{yield}}` helper as a placeholder for where the passed-in content will go. It is the same in an Ember addon.
Expand Down
Loading

0 comments on commit fe580fb

Please sign in to comment.