Skip to content

Commit

Permalink
Merge pull request #174 from yapplabs/chore/upgrade-lesser-dependencies
Browse files Browse the repository at this point in the history
Update ember-cli and other tooling dependencies.
  • Loading branch information
lukemelia authored Apr 5, 2017
2 parents 3102534 + fc87e78 commit 2576b3d
Show file tree
Hide file tree
Showing 23 changed files with 2,051 additions and 1,182 deletions.
14 changes: 0 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
};
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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
Expand All @@ -13,5 +13,5 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
testem.log
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.editorconfig
.ember-cli
.gitignore
.jshintrc
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
Expand Down
19 changes: 9 additions & 10 deletions addon/initializers/add-modals-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ function appendContainerElement(rootElementId, id) {
rootEl.appendChild(modalContainerEl);
}

export default function() {
let application = arguments[1] || arguments[0];
let emberModalDialog = application.emberModalDialog || {};
export default function(App) {
let emberModalDialog = App.emberModalDialog || {};
let modalContainerElId = emberModalDialog.modalRootElementId || 'modal-overlays';

application.register('config:modals-container-id',
modalContainerElId,
{ instantiate: false });
App.register('config:modals-container-id',
modalContainerElId,
{ instantiate: false });

application.inject('service:modal-dialog',
'destinationElementId',
'config:modals-container-id');
App.inject('service:modal-dialog',
'destinationElementId',
'config:modals-container-id');

appendContainerElement(application.rootElement, modalContainerElId);
appendContainerElement(App.rootElement, modalContainerElId);
}
6 changes: 1 addition & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"name": "ember-modal-dialog",
"dependencies": {
"bind-polyfill": "^1.0.0",
"ember": "~2.4.6",
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0"
"ember": "~2.4.6"
}
}
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
14 changes: 5 additions & 9 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-addon');
/* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(/*defaults*/) {
var app = new EmberApp({
module.exports = function(defaults) {
var app = new EmberAddon(defaults, {
snippetSearchPaths: ['tests/dummy/app']
});

/*
This build file specifes the options for the dummy test app of this
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/

if (app.env === 'test') {
app.import('bower_components/bind-polyfill/index.js');
}

return app.toTree();
};
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* jshint node: true */
/* eslint-env node */
'use strict';
var path = require('path');
var fs = require('fs');

module.exports = {
name: 'ember-modal-dialog'
Expand Down
63 changes: 31 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,54 @@
"name": "ember-modal-dialog",
"version": "1.0.0",
"description": "An ember-cli addon for implementing modal dialogs",
"keywords": [
"ember-addon"
],
"license": "MIT",
"author": "Yapp Labs and friends",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "https://github.com/yapplabs/ember-modal-dialog",
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "ember try:each",
"deploy": "ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\"; git push; git checkout -"
"start": "ember server",
"deploy": "ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\"; git push; git checkout -",
"test": "ember try:each"
},
"repository": "https://github.com/yapplabs/ember-modal-dialog",
"engines": {
"node": ">= 4"
"dependencies": {
"ember-cli-babel": "^5.1.7",
"ember-cli-htmlbars": "^1.0.8",
"ember-wormhole": "^0.5.1"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "^2.0.1",
"ember-cli": "2.6.2",
"ember-cli-app-version": "^1.0.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-github-pages": "0.0.6",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"broccoli-asset-rev": "^2.4.5",
"ember-cli": "^2.12.1",
"ember-cli-build-notifications": "^0.2.0",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli-github-pages": "^0.1.2",
"ember-cli-htmlbars-inline-precompile": "^0.3.6",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-lorem-ipsum": "0.0.2",
"ember-cli-qunit": "^1.4.0",
"ember-cli-release": "^0.2.9",
"ember-cli-sass": "3.1.1",
"ember-cli-qunit": "^3.1.2",
"ember-cli-release": "^1.0.0-beta.2",
"ember-cli-sass": "^6.1.2",
"ember-cli-shims": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-code-snippet": "1.3.0",
"ember-code-snippet": "^1.8.1",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-load-initializers": "^0.6.0",
"ember-resolver": "^2.0.3",
"ember-suave": "1.2.3",
"ember-tether": "^0.4.1",
"ember-truth-helpers": "1.2.0",
"loader.js": "^4.0.1"
"ember-truth-helpers": "^1.3.0",
"loader.js": "^4.2.3"
},
"dependencies": {
"ember-cli-babel": "^5.1.6",
"ember-cli-htmlbars": "^1.0.8",
"ember-wormhole": "^0.5.1"
"engines": {
"node": ">= 4"
},
"keywords": [
"ember-addon"
],
"ember-addon": {
"configPath": "tests/dummy/config",
"demoURL": "http://yapplabs.github.io/ember-modal-dialog/",
Expand Down
3 changes: 1 addition & 2 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
Expand Down
5 changes: 5 additions & 0 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
env: {
embertest: true
}
};
53 changes: 0 additions & 53 deletions tests/.jshintrc

This file was deleted.

32 changes: 0 additions & 32 deletions tests/dummy/.jshintrc

This file was deleted.

8 changes: 4 additions & 4 deletions tests/dummy/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

{{content-for "head"}}

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

{{content-for "head-footer"}}
</head>
<body>
{{content-for "body"}}

<script src="assets/vendor.js"></script>
<script src="assets/dummy.js"></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/dummy.js"></script>

{{content-for "body-footer"}}
</body>
Expand Down
8 changes: 4 additions & 4 deletions tests/dummy/app/initializers/register-subclassed-modals.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export default {
after: 'add-modals-container',
name: 'custom-modals',
initialize(_, application) {
initialize(App) {
let customModals = ['my-cool-modal-dialog'];
customModals.forEach(function(customModal) {
application.inject(`component:${customModal}`,
'destinationElementId',
'config:modals-container-id');
App.inject(`component:${customModal}`,
'destinationElementId',
'config:modals-container-id');
});
}
};
Loading

0 comments on commit 2576b3d

Please sign in to comment.