Skip to content

Commit

Permalink
Merge pull request #292 from Gaurav0/upgrade_ember_cli
Browse files Browse the repository at this point in the history
Upgrade ember cli
  • Loading branch information
Gaurav0 committed Dec 15, 2015
2 parents 7333c1c + 567ba44 commit 579bc9f
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 60 deletions.
4 changes: 2 additions & 2 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
34 changes: 21 additions & 13 deletions app/services/ember-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,59 +23,59 @@ const requiredFiles = [
const availableBlueprints = {
'templates/application': {
blueprint: 'templates/application',
filePath: 'application/template.hbs',
filePath: 'application/template.hbs'
},
'controllers/application': {
blueprint: 'controllers/application',
filePath: 'application/controller.js',
filePath: 'application/controller.js'
},
'app': {
blueprint: 'app',
filePath: 'app.js',
filePath: 'app.js'
},
'css': {
blueprint: 'app.css',
filePath: 'styles/app.css',
filePath: 'styles/app.css'
},
'component-hbs': {
blueprint: 'component-hbs',
filePath: 'my-component/template.hbs',
filePath: 'my-component/template.hbs'
},
'component-js': {
blueprint: 'component-js',
filePath: 'my-component/component.js',
filePath: 'my-component/component.js'
},
'controller': {
blueprint: 'controller',
filePath: 'my-route/controller.js',
filePath: 'my-route/controller.js'
},
'initializers/router': {
blueprint: 'initializers/router',
filePath: 'initializers/router.js',
filePath: 'initializers/router.js'
},
'initializers/mouse-events': {
blueprint: 'initializers/mouse-events',
filePath: 'initializers/mouse-events.js',
filePath: 'initializers/mouse-events.js'
},
'model': {
blueprint: 'model',
filePath: 'models/my-model.js',
filePath: 'models/my-model.js'
},
'helper': {
blueprint: 'helper',
filePath: 'helpers/my-helper.js'
},
'route': {
blueprint: 'route',
filePath: 'my-route/route.js',
filePath: 'my-route/route.js'
},
'service': {
blueprint: 'service',
filePath: 'my-service/service.js'
},
'template': {
blueprint: 'template',
filePath: 'my-route/template.hbs',
filePath: 'my-route/template.hbs'
},
'router': {
blueprint: 'router',
Expand Down Expand Up @@ -376,11 +376,19 @@ function babelOpts(moduleName) {
* @return {Array} Code buffer
*/
function contentForAppBoot (content, config) {
// Add in a shim for ember-resolver => ember/resolver for now since we are still bringing in old bower component
// TODO: Once we support included addons, bring in new ember-resolver addon
content.push(' define("ember-resolver", ["exports", "ember/resolver"],\n' +
' function(exports, Resolver) {\n' +
' exports["default"] = Resolver;\n' +
' });\n');

// Some modules are not actually transpiled so Babel
// doesn't recognize them properly...
var monkeyPatchModules = [
'ember',
'ember/load-initializers'
'ember/load-initializers',
'ember-resolver'
];

if ("ember-data" in config.dependencies) {
Expand Down
2 changes: 1 addition & 1 deletion app/torii-adapters/application.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import config from '../config/environment';
import Ember from 'ember';
import ajax from 'ic-ajax';
import ajax from 'ember-ajax';

export default Ember.Object.extend({ /**
* Resolve the user over the Github API using the token
Expand Down
16 changes: 7 additions & 9 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@
"ember": "2.2.0",
"ember-cli-shims": "0.0.6",
"ember-cli-test-loader": "0.2.1",
"ember-data": "2.2.0",
"ember-data": "2.2.1",
"ember-load-initializers": "0.1.7",
"ember-qunit": "0.4.16",
"ember-qunit-notifications": "0.1.0",
"ember-resolver": "0.1.21",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.2.1",
"loader.js": "ember-cli/loader.js#3.5.0",
"qunit": "~1.20.0",
"codemirror": "~5.6.0",
"codemirror": "~5.9.0",
"ember-cli-codemirror-shim": "~0.0.1",
"bootstrap-sass": "~3.3.5",
"dom-ruler": "0.1.12",
"pretender": "~0.9.0",
"dom-ruler": "0.1.13",
"pretender": "~0.10.1",
"ember-inflector": "~1.3.1",
"lodash": "~3.10.0",
"Faker": "~3.0.0",
Expand All @@ -25,8 +24,7 @@
"moment-timezone": ">= 0.1.0"
},
"resolutions": {
"codemirror": "~5.6.0",
"ember": "2.2.0",
"qunit-notifications": "~0.1.0"
"codemirror": "~5.9.0",
"ember": "2.2.0"
}
}
6 changes: 3 additions & 3 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function() {
},
fileCreator: [{filename: '/lib/blueprints.js', content: blueprintsCode}],
sourcemaps: {
enabled: !isProductionLikeBuild,
enabled: !isProductionLikeBuild
},
minifyCSS: { enabled: isProductionLikeBuild },
minifyJS: { enabled: isProductionLikeBuild },
Expand Down Expand Up @@ -63,9 +63,9 @@ module.exports = function() {
'loader.js/loader.js',
'ember-resolver/dist/modules/ember-resolver.js',
'ember-cli-shims/app-shims.js',
'ember-load-initializers/ember-load-initializers.js',
'ember-load-initializers/ember-load-initializers.js'
],
outputFile: '/assets/twiddle-deps.js',
outputFile: '/assets/twiddle-deps.js'
});

return mergeTrees([app.toTree(), twiddleVendorTree, loaderTree]);
Expand Down
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,50 @@
"broccoli-concat": "0.0.13",
"broccoli-funnel": "^1.0.0",
"broccoli-merge-trees": "^1.0.0",
"broccoli-static-compiler": "0.2.1",
"broccoli-static-compiler": "0.2.2",
"dc-tabs": "0.1.0",
"dedent": "^0.4.0",
"ember-api-actions": "0.0.7",
"ember-autoresize": "0.5.12",
"ember-browserify": "1.1.1",
"ember-cli": "1.13.12",
"dedent": "~0.6.0",
"ember-ajax": "0.7.1",
"ember-api-actions": "0.0.11",
"ember-autoresize": "0.5.14",
"ember-browserify": "1.1.4",
"ember-cli": "2.2.0-beta.1",
"ember-cli-app-version": "1.0.0",
"ember-cli-babel": "^5.1.5",
"ember-cli-bootstrap-sassy": "0.0.18",
"ember-cli-build-notifications": "0.0.3",
"ember-cli-dependency-checker": "1.1.0",
"ember-cli-deploy": "^0.4.2",
"ember-cli-bootstrap-sassy": "0.5.1",
"ember-cli-build-notifications": "0.1.0",
"ember-cli-dependency-checker": "1.2.0",
"ember-cli-deploy": "~0.4.2",
"ember-cli-document-title": "0.2.0",
"ember-cli-file-creator": "^0.1.1",
"ember-cli-htmlbars": "1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-ic-ajax": "0.2.4",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-jstree": "1.0.0",
"ember-cli-mirage": "0.1.11",
"ember-cli-moment-shim": "0.6.2",
"ember-cli-qunit": "1.0.4",
"ember-cli-moment-shim": "0.7.1",
"ember-cli-qunit": "1.1.0",
"ember-cli-release": "0.2.8",
"ember-cli-sass": "4.1.0",
"ember-cli-sri": "1.1.0",
"ember-cli-uglify": "1.2.0",
"ember-data": "2.2.0",
"ember-cli-sass": "5.2.1",
"ember-deploy-s3": "0.0.5",
"ember-deploy-s3-index": "^0.4.0",
"ember-disable-proxy-controllers": "1.0.1",
"ember-export-application-global": "1.0.4",
"ember-deploy-s3-index": "Kerry350/ember-deploy-s3-index#d25817a0c0849392e786c4eb4222629905aba190",
"ember-git-version": "0.1.0",
"ember-legacy-views": "0.2.0",
"ember-load": "mike-north/ember-load#ca1264f12c334061d5f151c533c78739a52f6bac",
"ember-load": "0.0.3",
"ember-lodash": "0.0.6",
"ember-moment": "4.0.1",
"ember-notify": "4.0.1",
"ember-resolver": "^2.0.3",
"ember-moment": "4.2.1",
"ember-notify": "4.3.1",
"ember-responsive": "1.2.3",
"ivy-codemirror": "~1.2.0",
"torii": "^0.6.0"
},
"dependencies": {
"babel": "^5.0.0"
"babel": "^5.0.0",
"ember-cli-sri": "1.2.0",
"ember-cli-uglify": "1.2.0",
"ember-data": "2.2.1",
"ember-disable-proxy-controllers": "1.0.1",
"ember-export-application-global": "1.0.4",
"ember-resolver": "~2.0.3"
}
}
2 changes: 1 addition & 1 deletion tests/helpers/resolver.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Resolver from 'ember/resolver';
import Resolver from 'ember-resolver';
import config from '../../config/environment';

const resolver = Resolver.create();
Expand Down
12 changes: 6 additions & 6 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for 'head'}}
{{content-for 'test-head'}}
{{content-for "head"}}
{{content-for "test-head"}}

<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/ember-twiddle.css">
Expand All @@ -24,16 +24,16 @@
<div id="demo-app">
</div>

{{content-for 'body'}}
{{content-for 'test-body'}}
{{content-for "body"}}
{{content-for "test-body"}}
<script src="assets/vendor.js"></script>
<script src="assets/test-support.js"></script>
<script src="assets/ember-twiddle.js"></script>
<script src="testem.js" integrity=""></script>
<script src="assets/tests.js"></script>
<script src="assets/test-loader.js"></script>

{{content-for 'body-footer'}}
{{content-for 'test-body-footer'}}
{{content-for "body-footer"}}
{{content-for "test-body-footer"}}
</body>
</html>

0 comments on commit 579bc9f

Please sign in to comment.