Skip to content

Commit

Permalink
Update to Ember & Ember CLI 2.18
Browse files Browse the repository at this point in the history
  • Loading branch information
kategengler committed Jan 14, 2018
1 parent d932454 commit f1a33a6
Show file tree
Hide file tree
Showing 25 changed files with 135 additions and 197 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

136 changes: 47 additions & 89 deletions .eslintrc.js
@@ -1,98 +1,56 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: false,
node: true,
},
globals: {
browser: true
},
rules: {
/*** Possible Errors ***/

'no-console': 0,
'no-template-curly-in-string': 2,
'no-unsafe-negation': 2,

/*** Best Practices ***/

'curly': 2,
'eqeqeq': 2,
'guard-for-in': 0,
'no-caller': 2,
'no-eq-null': 2,
'no-eval': 2,
'no-multi-spaces': [2, {
'exceptions': {
'ObjectExpression': true,
'Property': true,
},
}],
'no-new': 0,
'no-unused-expressions': [2, {
allowShortCircuit: true,
allowTernary: true,
}],
'wrap-iife': 0,
'yoda': 2,

/*** Strict Mode ***/

'strict': [2, 'global'],

/*** Variables ***/

'no-undef': 2,
'no-unused-vars': 2,
'no-use-before-define': [2, 'nofunc'],

/*** Stylistic Issues ***/

'array-bracket-spacing': 2,
'block-spacing': 2,
'brace-style': [2, '1tbs', {
'allowSingleLine': true,
}],
'camelcase': 2,
'comma-dangle': 0,
'comma-spacing': 2,
'comma-style': 2,
'eol-last': 2,
'func-call-spacing': 2,
'indent': [2, 2, {
'SwitchCase': 1,
'VariableDeclarator': { 'var': 2, 'let': 2, 'const': 3 }
}],
'key-spacing': 2,
'keyword-spacing': 2,
'linebreak-style': [2, 'unix'],
'new-cap': [2, {
properties: false,
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-bitwise': 2,
'no-lonely-if': 2,
'no-mixed-operators': 2,
'no-plusplus': 0,
'no-trailing-spaces': 2,
'no-unneeded-ternary': 2,
'no-whitespace-before-property': 2,
'object-curly-spacing': [2, 'always'],
'semi-spacing': 2,
'semi': 2,
'space-before-blocks': 2,
'space-before-function-paren': [2, 'never'],
'space-in-parens': 2,
'space-infix-ops': 2,
'space-unary-ops': 2,
'quotes': [2, 'single', {
'allowTemplateLiterals': true,
}],
'semi': [2, 'always'],
'wrap-regex': 2
},
overrides: [
// node files
{
files: [
'index.js',
'testem.js',
'ember-cli-build.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
},

// test files
{
files: ['tests/**/*.js'],
excludedFiles: ['tests/dummy/**/*.js'],
env: {
embertest: true
}
}
]
};
11 changes: 8 additions & 3 deletions .gitignore
@@ -1,9 +1,8 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/fastboot-dist

# dependencies
/node_modules
Expand All @@ -14,7 +13,13 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
yarn-error.log
testem.log

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

.scratch
21 changes: 11 additions & 10 deletions .npmignore
@@ -1,25 +1,26 @@
bower_components/
config/
dist/
test/
tests/
tmp/
/bower_components
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.codeclimate.yml
.editorconfig
.ember-cli
.eslintignore
.eslintrc.js
.gitignore
.jscsrc
.jshintrc
.travis.yml
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
all-commands.sh
smoke-test.sh
testem.json
upload-coverage.sh

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -7,6 +7,10 @@ node_js:
# - "6" - The test that includes coverage runs with 6

sudo: false
dist: trusty

addons:
chrome: stable

addons:
chrome: stable
Expand Down Expand Up @@ -40,7 +44,6 @@ before_install:

install:
- npm install
- bower install

script:
- npm run-script $NPM_SCRIPT
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016
Copyright (c) 2018

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
7 changes: 0 additions & 7 deletions bower.json
@@ -1,7 +0,0 @@
{
"name": "ember-try",
"dependencies": {
"ember": "~2.8.0",
"ember-cli-shims": "0.1.1"
}
}
Empty file added config/ember-try.js
Empty file.
1 change: 0 additions & 1 deletion config/environment.js
@@ -1,4 +1,3 @@
/*jshint node:true*/
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
8 changes: 4 additions & 4 deletions ember-cli-build.js
@@ -1,9 +1,9 @@
/*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
let app = new EmberAddon(defaults, {
// Add options here
});

Expand Down
1 change: 0 additions & 1 deletion index.js
@@ -1,4 +1,3 @@
/* jshint node: true */
'use strict';

module.exports = {
Expand Down
31 changes: 17 additions & 14 deletions package.json
Expand Up @@ -8,18 +8,19 @@
},
"scripts": {
"build": "ember build",
"start": "ember server",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"start": "ember serve",
"test": "npm run-script lint && npm run-script node-test && npm run-script client-test",
"client-test": "./all-commands.sh",
"node-test": "mocha test/**/*.js",
"all-test": "npm run-script node-test && npm run-script smoke-test",
"node-test-with-coverage": "istanbul cover _mocha test/**/*.js && ./upload-coverage.sh",
"smoke-test": "./smoke-test.sh",
"lint": "eslint lib test",
"test": "npm run-script lint && npm run-script node-test && npm run-script client-test"
"lint": "eslint lib test"
},
"repository": "ember-cli/ember-try",
"engines": {
"node": ">= 4.5"
"node": "^4.5 || 6.* || >= 7.*"
},
"author": "Katie Gengler",
"license": "MIT",
Expand All @@ -28,23 +29,25 @@
"broccoli-asset-rev": "^2.4.2",
"chai": "^3.5.0",
"codeclimate-test-reporter": "^0.3.1",
"ember-cli": "2.12.0",
"ember-cli": "~2.18.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-babel": "^5.1.3",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-qunit": "^2.1.0",
"ember-cli-qunit": "^4.1.1",
"ember-cli-release": "^0.2.9",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"ember-cli-uglify": "^2.0.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"eslint": "^3.16.1",
"eslint-plugin-ember": "^5.0.0",
"eslint-plugin-node": "^5.2.1",
"glob": "^7.0.0",
"istanbul": "1.0.0-alpha.2",
"loader.js": "^4.0.1",
Expand Down
1 change: 0 additions & 1 deletion testem.js
@@ -1,4 +1,3 @@
/*jshint node:true*/
module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
Expand Down
8 changes: 2 additions & 6 deletions tests/dummy/app/app.js
@@ -1,13 +1,9 @@
import Ember from 'ember';
import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

let App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Ember.Application.extend({
const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/index.html
Expand Up @@ -9,8 +9,8 @@

{{content-for "head"}}

<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/dummy.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/dummy.css">

{{content-for "head-footer"}}
</head>
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/router.js
@@ -1,7 +1,7 @@
import Ember from 'ember';
import EmberRouter from '@ember/routing/router';
import config from './config/environment';

const Router = Ember.Router.extend({
const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/templates/application.hbs
@@ -1,3 +1,3 @@
<h2 id="title">Welcome to Ember</h2>

{{outlet}}
{{outlet}}

0 comments on commit f1a33a6

Please sign in to comment.