diff --git a/.editorconfig b/.editorconfig index e20a9680d23..47c5438403c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,11 +1,34 @@ -# http://editorconfig.org +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org root = true + [*] +end_of_line = lf charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true indent_style = space indent_size = 2 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true \ No newline at end of file + +[*.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/.ember-cli b/.ember-cli new file mode 100644 index 00000000000..ee64cfed2a8 --- /dev/null +++ b/.ember-cli @@ -0,0 +1,9 @@ +{ + /** + Ember CLI sends analytics information by default. The data is completely + anonymous, but there are times when you might want to disable this behavior. + + Setting `disableAnalytics` to true will prevent any data from being sent. + */ + "disableAnalytics": false +} diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000000..49996f5a391 --- /dev/null +++ b/.npmignore @@ -0,0 +1,14 @@ +bower_components/ +tests/ +tmp/ +dist/ + +.bowerrc +.editorconfig +.ember-cli +.travis.yml +.npmignore +**/.gitkeep +bower.json +Brocfile.js +testem.json diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 00000000000..e7834e3e4f3 --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["tmp", "dist"] +} diff --git a/config/ember-try.js b/config/ember-try.js index 83dab0f1846..3e88bc612a1 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -1,3 +1,4 @@ +/*jshint node:true*/ module.exports = { scenarios: [ { diff --git a/package.json b/package.json index 7f229a2eb08..cfb62ce1f53 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "broccoli-string-replace": "^0.1.1", "broccoli-uglify-sourcemap": "^1.0.1", "broccoli-yuidoc": "^2.1.0", - "ember-cli": "1.13.8", + "ember-cli": "1.13.12", "ember-cli-app-version": "0.5.0", "ember-cli-content-security-policy": "0.4.0", "ember-cli-dependency-checker": "^1.0.1", diff --git a/tests/dummy/app/app.js b/tests/dummy/app/app.js index 8d66b958758..8b234d6d57b 100644 --- a/tests/dummy/app/app.js +++ b/tests/dummy/app/app.js @@ -3,14 +3,14 @@ import Resolver from 'ember/resolver'; import loadInitializers from 'ember/load-initializers'; import config from './config/environment'; -var App; +let App; Ember.MODEL_FACTORY_INJECTIONS = true; App = Ember.Application.extend({ modulePrefix: config.modulePrefix, podModulePrefix: config.podModulePrefix, - Resolver: Resolver + Resolver }); loadInitializers(App, config.modulePrefix); diff --git a/tests/dummy/app/router.js b/tests/dummy/app/router.js index cef554b3d9e..3bba78ebc80 100644 --- a/tests/dummy/app/router.js +++ b/tests/dummy/app/router.js @@ -1,7 +1,7 @@ import Ember from 'ember'; import config from './config/environment'; -var Router = Ember.Router.extend({ +const Router = Ember.Router.extend({ location: config.locationType }); diff --git a/tests/helpers/destroy-app.js b/tests/helpers/destroy-app.js new file mode 100644 index 00000000000..c3d4d1abb5d --- /dev/null +++ b/tests/helpers/destroy-app.js @@ -0,0 +1,5 @@ +import Ember from 'ember'; + +export default function destroyApp(application) { + Ember.run(application, 'destroy'); +} diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js new file mode 100644 index 00000000000..ed23003db40 --- /dev/null +++ b/tests/helpers/module-for-acceptance.js @@ -0,0 +1,23 @@ +import { module } from 'qunit'; +import startApp from '../helpers/start-app'; +import destroyApp from '../helpers/destroy-app'; + +export default function(name, options = {}) { + module(name, { + beforeEach() { + this.application = startApp(); + + if (options.beforeEach) { + options.beforeEach.apply(this, arguments); + } + }, + + afterEach() { + destroyApp(this.application); + + if (options.afterEach) { + options.afterEach.apply(this, arguments); + } + } + }); +} diff --git a/tests/helpers/resolver.js b/tests/helpers/resolver.js index 28f4ece46a0..ebfb4e4d455 100644 --- a/tests/helpers/resolver.js +++ b/tests/helpers/resolver.js @@ -1,7 +1,7 @@ import Resolver from 'ember/resolver'; import config from '../../config/environment'; -var resolver = Resolver.create(); +const resolver = Resolver.create(); resolver.namespace = { modulePrefix: config.modulePrefix, diff --git a/tests/helpers/start-app.js b/tests/helpers/start-app.js index 0f7aab1afb5..e098f1d5be6 100644 --- a/tests/helpers/start-app.js +++ b/tests/helpers/start-app.js @@ -3,12 +3,12 @@ import Application from '../../app'; import config from '../../config/environment'; export default function startApp(attrs) { - var application; + let application; - var attributes = Ember.merge({}, config.APP); + let attributes = Ember.merge({}, config.APP); attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; - Ember.run(function() { + Ember.run(() => { application = Application.create(attributes); application.setupForTesting(); application.injectTestHelpers(); diff --git a/tests/index.html b/tests/index.html index bd598bf0d51..5e88e5e10c2 100644 --- a/tests/index.html +++ b/tests/index.html @@ -18,13 +18,14 @@ {{content-for 'test-head-footer'}} - {{content-for 'body'}} {{content-for 'test-body'}} + + {{content-for 'body-footer'}}