From dc152fb2b3ceedf794176d35ddadfb7b822fea28 Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 5 Oct 2016 23:43:18 -0700 Subject: [PATCH] modernizing: part 1 --- .editorconfig | 14 -------------- .jshintrc | 2 +- app/index.html | 8 ++++---- app/router.js | 3 ++- bower.json | 15 +++++++-------- config/environment.js | 5 ++--- package.json | 20 ++++++++++---------- tests/.jshintrc | 2 +- tests/helpers/module-for-acceptance.js | 12 ++++++------ tests/index.html | 17 ++++++++--------- 10 files changed, 41 insertions(+), 57 deletions(-) diff --git a/.editorconfig b/.editorconfig index 47c5438..219985c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,22 +13,8 @@ insert_final_newline = true indent_style = space indent_size = 2 -[*.js] -indent_style = space -indent_size = 2 - [*.hbs] insert_final_newline = false -indent_style = space -indent_size = 2 - -[*.css] -indent_style = space -indent_size = 2 - -[*.html] -indent_style = space -indent_size = 2 [*.{diff,md}] trim_trailing_whitespace = false diff --git a/.jshintrc b/.jshintrc index dae9b20..42624ff 100644 --- a/.jshintrc +++ b/.jshintrc @@ -32,6 +32,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true, + "esversion": 6, "unused": true } diff --git a/app/index.html b/app/index.html index b7e8bd2..6c8a585 100644 --- a/app/index.html +++ b/app/index.html @@ -35,8 +35,8 @@ - - + + {{content-for 'head-footer'}} @@ -55,8 +55,8 @@ {{content-for 'body'}} - - + + {{content-for 'body-footer'}} diff --git a/app/router.js b/app/router.js index 3bba78e..cdc2578 100644 --- a/app/router.js +++ b/app/router.js @@ -2,7 +2,8 @@ import Ember from 'ember'; import config from './config/environment'; const Router = Ember.Router.extend({ - location: config.locationType + location: config.locationType, + rootURL: config.rootURL }); Router.map(function() { diff --git a/bower.json b/bower.json index bff4dd1..dba924c 100644 --- a/bower.json +++ b/bower.json @@ -1,17 +1,16 @@ { "name": "huegasm", "dependencies": { - "bootstrap-sass": "~3.3.5", - "ember": "~2.4.1", - "ember-cli-shims": "0.1.0", - "ember-cli-test-loader": "0.2.2", + "bootstrap-sass": "^3.3.5", + "ember": "^2.8.1", + "ember-cli-shims": "^0.1.0", "ember-load-initializers": "0.5.1", "ember-qunit-notifications": "0.1.0", - "intro.js": "~2.1.0", + "intro.js": "^2.1.0", "JavaScript-ID3-Reader": "https://github.com/aadsm/JavaScript-ID3-Reader.git", - "jquery-mousewheel": "~3.1.13", - "locallyjs": "~0.3.2", - "matchMedia": "~0.3.0", + "jquery-mousewheel": "^3.1.13", + "locallyjs": "^0.3.2", + "matchMedia": "^0.3.0", "nouislider": "^8.3.0", "HackTimer": "https://github.com/turuslan/HackTimer.git#~1.0.0", "hammer.js": "^2.0.8" diff --git a/config/environment.js b/config/environment.js index d502f2d..d1ba865 100644 --- a/config/environment.js +++ b/config/environment.js @@ -5,7 +5,7 @@ module.exports = function(environment) { modulePrefix: 'huegasm', podModulePrefix: 'huegasm/pods', environment: environment, - baseURL: '/', + rootURL: '/', locationType: 'auto', EmberENV: { FEATURES: { @@ -30,7 +30,6 @@ module.exports = function(environment) { if (environment === 'test') { // Testem prefers this... - ENV.baseURL = '/'; ENV.locationType = 'none'; // keep test console output quieter @@ -41,7 +40,7 @@ module.exports = function(environment) { } if (environment === 'production') { - //ENV.baseURL = '/huegasm'; + } return ENV; diff --git a/package.json b/package.json index 3233106..4650195 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "huegasm", - "version": "1.0.0", - "description": "Small description for huegasm goes here", + "version": "2.0.0", + "description": "Huegasm is a free web application for managing and synchronizing your Philips Hue lights with the beat of your music.", "private": true, "directories": { "doc": "doc", @@ -15,32 +15,32 @@ "engines": { "node": ">= 0.10.0" }, - "author": "", + "author": "Egor Philippov", "license": "MIT", "devDependencies": { "broccoli-asset-rev": "^2.2.0", - "ember-cli": "^2.4.2", + "ember-ajax": "^2.0.1", + "ember-cli": "^2.8.0", "ember-cli-app-version": "^1.0.0", "ember-cli-babel": "^5.1.5", "ember-cli-dependency-checker": "^1.2.0", "ember-cli-htmlbars": "^1.0.1", "ember-cli-htmlbars-inline-precompile": "^0.3.1", "ember-cli-inject-live-reload": "^1.3.1", - "ember-cli-nouislider": "0.7.0", + "ember-cli-nouislider": "0.10.0", "ember-cli-qunit": "^1.2.1", "ember-cli-release": "0.2.8", - "ember-cli-sass": "5.2.1", + "ember-cli-sass": "^5.2.1", "ember-cli-sri": "^2.1.0", + "ember-cli-test-loader": "^1.1.0", "ember-cli-uglify": "^1.2.0", - "ember-cli-windows-addon": "^1.2.2", - "ember-disable-proxy-controllers": "^1.0.1", "ember-export-application-global": "^1.0.4", "ember-load-initializers": "^0.5.0", - "ember-modal-dialog": "0.8.3", + "ember-modal-dialog": "^0.8.3", "ember-notify": "^5.0.4", "ember-paper": "^0.2.14", "ember-resolver": "^2.0.3", - "ember-truth-helpers": "1.2.0", + "ember-truth-helpers": "^1.2.0", "loader.js": "^4.0.7" } } diff --git a/tests/.jshintrc b/tests/.jshintrc index 6ec0b7c..d2bd113 100644 --- a/tests/.jshintrc +++ b/tests/.jshintrc @@ -47,6 +47,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true, + "esversion": 6, "unused": true } diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js index 8c8b74e..76996fd 100644 --- a/tests/helpers/module-for-acceptance.js +++ b/tests/helpers/module-for-acceptance.js @@ -1,23 +1,23 @@ import { module } from 'qunit'; +import Ember from 'ember'; import startApp from '../helpers/start-app'; import destroyApp from '../helpers/destroy-app'; +const { RSVP: { Promise } } = Ember; + export default function(name, options = {}) { module(name, { beforeEach() { this.application = startApp(); if (options.beforeEach) { - options.beforeEach.apply(this, arguments); + return options.beforeEach.apply(this, arguments); } }, afterEach() { - if (options.afterEach) { - options.afterEach.apply(this, arguments); - } - - destroyApp(this.application); + let afterEach = options.afterEach && options.afterEach.apply(this, arguments); + return Promise.resolve(afterEach).then(() => destroyApp(this.application)); } }); } diff --git a/tests/index.html b/tests/index.html index 0cdd486..9ea9afb 100644 --- a/tests/index.html +++ b/tests/index.html @@ -10,9 +10,9 @@ {{content-for "head"}} {{content-for "test-head"}} - - - + + + {{content-for "head-footer"}} {{content-for "test-head-footer"}} @@ -21,12 +21,11 @@ {{content-for "body"}} {{content-for "test-body"}} - - - - - - + + + + + {{content-for "body-footer"}} {{content-for "test-body-footer"}}