diff --git a/_ember/Brocfile.js b/_ember/Brocfile.js deleted file mode 100644 index 3485b60..0000000 --- a/_ember/Brocfile.js +++ /dev/null @@ -1,47 +0,0 @@ -/* global require, module */ - -var EmberApp = require('ember-cli/lib/broccoli/ember-app'); - -var app = new EmberApp({ - storeConfigInMeta: false, - fingerprint: { - enabled: false - }, - sourcemaps: { - "enabled": false, - "extensions": ["js"] - }, - outputPaths: { - app: { - html: 'index.html', - css: { 'app': '/viewtastic.css'}, - js: "/assets/viewtastic.js" - }, - vendor: { - css: '/vendor.css', - js: "/assets/vendor.js" - } - } -}); - - -// Use `app.import` to add additional libraries to the generated -// output files. -// -// If you need to use different assets in different -// environments, specify an object as the first parameter. That -// object's keys should be the environment name and the values -// should be the asset to use in that environment. -// -// If the library that you are including contains AMD or ES6 -// modules that you would like to import into your application -// please specify an object with the list of modules as keys -// along with the exports of each module as its value. - -// see https://github.com/ember-cli/ember-cli/issues/3497 -// consider ember-test-helpers -if (EmberApp.env() !== 'production') { - app.import('bower_components/ember/ember-template-compiler.js'); -} - -module.exports = app.toTree(); diff --git a/_ember/bin/update b/_ember/bin/update new file mode 100755 index 0000000..e087676 --- /dev/null +++ b/_ember/bin/update @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +set -e + +export EMBER_VERSION="${EMBER_VERSION:-1.13.8}" + +# https://github.com/ember-cli/ember-cli/releases +# http://www.jordanhawker.com/posts/128580938346 + +# Update ember-cli +update_cli() { + npm uninstall -g ember-cli # Remove old global ember-cli + npm cache clean # Clear NPM cache + bower cache clean # Clear Bower cache + npm install -g "ember-cli@${EMBER_VERSION}" # Install new global ember-cli +} + +# Update project +update_app() { + rm -rf node_modules bower_components dist tmp # Delete temporary development folders. + npm install --save-dev "ember-cli@${EMBER_VERSION}" # Update project's package.json to use latest version. + npm install # Reinstall NPM dependencies. + bower install # Reinstall bower dependencies. + ember init # This runs the new project blueprint on your projects directory. + # Please follow the prompts, and review all changes + # (tip: you can see a diff by pressing d). + # The most common source of upgrade pain is missing changes in this step. +} + +# Post install +post_update_app() { + npm uninstall --save ember-data + bower install --save ember-qunit + npm install --save-dev ember-cli-qunit + ember install mitchlloyd/ember-islands + ember install ember-cli-mirage + npm install + bower install +} + +case "$@" in + + cli) update_cli ;; + app) update_app ;; + post_app) post_update_app ;; + *) + update_cli + update_app + post_update_app + ;; + +esac diff --git a/_ember/bower.json b/_ember/bower.json index 1bb8748..901dfb5 100644 --- a/_ember/bower.json +++ b/_ember/bower.json @@ -1,19 +1,19 @@ { "name": "viewtastic", "dependencies": { - "ember": "1.13.0", + "ember": "1.13.7", "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3", "ember-cli-test-loader": "ember-cli-test-loader#0.1.3", - "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4", - "ember-qunit": "0.4.0", + "ember-data": "1.13.8", + "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5", + "ember-qunit": "~0.4.10", "ember-qunit-notifications": "0.0.7", - "ember-resolver": "~0.1.15", - "jquery": "^1.11.1", - "loader.js": "ember-cli/loader.js#3.2.0", - "qunit": "~1.17.1", - "pretender": "~0.6.0", - "ember-inflector": "~1.3.1", + "ember-resolver": "~0.1.18", + "Faker": "~3.0.0", + "jquery": "^1.11.3", + "loader.js": "ember-cli/loader.js#3.2.1", "lodash": "~3.7.0", - "Faker": "~2.1.3" + "pretender": "~0.9.0", + "qunit": "~1.18.0" } } diff --git a/_ember/ember-cli-build.js b/_ember/ember-cli-build.js new file mode 100644 index 0000000..df1ca2f --- /dev/null +++ b/_ember/ember-cli-build.js @@ -0,0 +1,45 @@ +/* global require, module */ +var EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function(defaults) { + var app = new EmberApp(defaults, { + storeConfigInMeta: false, + fingerprint: { + enabled: false + }, + sourcemaps: { + "enabled": false, + "extensions": ["js"] + }, + outputPaths: { + app: { + html: 'index.html', + css: { 'app': '/viewtastic.css'}, + js: "/assets/viewtastic.js" + }, + vendor: { + css: '/vendor.css', + js: "/assets/vendor.js" + } + } + }); + + // Use `app.import` to add additional libraries to the generated + // output files. + // + // If you need to use different assets in different + // environments, specify an object as the first parameter. That + // object's keys should be the environment name and the values + // should be the asset to use in that environment. + // + // If the library that you are including contains AMD or ES6 + // modules that you would like to import into your application + // please specify an object with the list of modules as keys + // along with the exports of each module as its value. + + if (EmberApp.env() !== 'production') { + app.import('bower_components/ember/ember-template-compiler.js'); + } + + return app.toTree(); +}; diff --git a/_ember/package.json b/_ember/package.json index 397c11e..02c1f9d 100644 --- a/_ember/package.json +++ b/_ember/package.json @@ -8,8 +8,8 @@ "test": "tests" }, "scripts": { - "start": "ember server", "build": "ember build", + "start": "ember server", "test": "ember test" }, "repository": "", @@ -19,24 +19,23 @@ "author": "", "license": "MIT", "devDependencies": { - "addon": "0.0.0", - "broccoli-asset-rev": "^2.0.2", - "ember-cli": "0.2.7", - "ember-cli-app-version": "0.3.3", - "ember-cli-babel": "^5.0.0", - "ember-cli-content-security-policy": "^0.4.0", - "ember-cli-dependency-checker": "^1.0.0", - "ember-cli-htmlbars": "0.7.6", - "ember-cli-htmlbars-inline-precompile": "^0.1.1", - "ember-cli-ic-ajax": "0.1.1", - "ember-cli-inject-live-reload": "^1.3.0", - "ember-cli-mirage": "0.1.5", - "ember-cli-qunit": "^0.3.14", - "ember-cli-uglify": "^1.0.1", + "broccoli-asset-rev": "^2.1.2", + "ember-cli": "1.13.8", + "ember-cli-app-version": "0.5.0", + "ember-cli-babel": "^5.1.3", + "ember-cli-content-security-policy": "0.4.0", + "ember-cli-dependency-checker": "^1.0.1", + "ember-cli-htmlbars": "0.7.9", + "ember-cli-htmlbars-inline-precompile": "^0.2.0", + "ember-cli-ic-ajax": "0.2.1", + "ember-cli-inject-live-reload": "^1.3.1", + "ember-cli-mirage": "0.1.8", + "ember-cli-qunit": "^1.0.1", + "ember-cli-release": "0.2.3", + "ember-cli-sri": "^1.0.3", + "ember-cli-uglify": "^1.2.0", "ember-disable-proxy-controllers": "^1.0.0", - "ember-export-application-global": "^1.0.2", - "ember-islands": "mitchlloyd/ember-islands", - "glob": "^4.5.3", - "morgan": "^1.6.0" + "ember-export-application-global": "^1.0.3", + "ember-islands": "git://github.com/mitchlloyd/ember-islands.git#da835969a4f5730777aa4722a11d1e7fc69e39be" } } diff --git a/_ember/tests/.jshintrc b/_ember/tests/.jshintrc index 71537c0..4f9f51d 100644 --- a/_ember/tests/.jshintrc +++ b/_ember/tests/.jshintrc @@ -27,7 +27,7 @@ "node": false, "browser": false, "boss": true, - "curly": false, + "curly": true, "debug": false, "devel": false, "eqeqeq": true, @@ -48,5 +48,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true + "esnext": true, + "unused": true } diff --git a/_ember/tests/helpers/start-app.js b/_ember/tests/helpers/start-app.js index 16cc7c3..0f7aab1 100644 --- a/_ember/tests/helpers/start-app.js +++ b/_ember/tests/helpers/start-app.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import Application from '../../app'; -import Router from '../../router'; import config from '../../config/environment'; export default function startApp(attrs) {