Commit ac6c1da
2014-11-19 03:28:29
Changed files (36)
app
config
public
tests
vendor
app/components/.gitkeep
app/controllers/.gitkeep
app/helpers/.gitkeep
app/models/.gitkeep
app/routes/.gitkeep
app/styles/.gitkeep
app/styles/app.css
@@ -0,0 +1,3 @@
+html, body {
+ margin: 20px;
+}
app/templates/components/.gitkeep
app/templates/.gitkeep
app/templates/application.hbs
@@ -0,0 +1,3 @@
+<h2 id='title'>Welcome to Ember.js</h2>
+
+{{outlet}}
app/views/.gitkeep
app/app.js
@@ -0,0 +1,16 @@
+import Ember from 'ember';
+import Resolver from 'ember/resolver';
+import loadInitializers from 'ember/load-initializers';
+import config from './config/environment';
+
+Ember.MODEL_FACTORY_INJECTIONS = true;
+
+var App = Ember.Application.extend({
+ modulePrefix: config.modulePrefix,
+ podModulePrefix: config.podModulePrefix,
+ Resolver: Resolver
+});
+
+loadInitializers(App, config.modulePrefix);
+
+export default App;
app/index.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>Cakery</title>
+ <meta name="description" content="">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ {{content-for 'head'}}
+
+ <link rel="stylesheet" href="assets/vendor.css">
+ <link rel="stylesheet" href="assets/cakery.css">
+ </head>
+ <body>
+ {{content-for 'body'}}
+
+ <script src="assets/vendor.js"></script>
+ <script src="assets/cakery.js"></script>
+ </body>
+</html>
app/router.js
@@ -0,0 +1,11 @@
+import Ember from 'ember';
+import config from './config/environment';
+
+var Router = Ember.Router.extend({
+ location: config.locationType
+});
+
+Router.map(function() {
+});
+
+export default Router;
config/environment.js
@@ -0,0 +1,47 @@
+/* jshint node: true */
+
+module.exports = function(environment) {
+ var ENV = {
+ modulePrefix: 'cakery',
+ environment: environment,
+ baseURL: '/',
+ locationType: 'auto',
+ EmberENV: {
+ FEATURES: {
+ // Here you can enable experimental features on an ember canary build
+ // e.g. 'with-controller': true
+ }
+ },
+
+ APP: {
+ // Here you can pass flags/options to your application instance
+ // when it is created
+ }
+ };
+
+ if (environment === 'development') {
+ // ENV.APP.LOG_RESOLVER = true;
+ ENV.APP.LOG_ACTIVE_GENERATION = true;
+ // ENV.APP.LOG_TRANSITIONS = true;
+ // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
+ ENV.APP.LOG_VIEW_LOOKUPS = true;
+ }
+
+ if (environment === 'test') {
+ // Testem prefers this...
+ ENV.baseURL = '/';
+ ENV.locationType = 'auto';
+
+ // keep test console output quieter
+ ENV.APP.LOG_ACTIVE_GENERATION = false;
+ ENV.APP.LOG_VIEW_LOOKUPS = false;
+
+ ENV.APP.rootElement = '#ember-testing';
+ }
+
+ if (environment === 'production') {
+
+ }
+
+ return ENV;
+};
public/.gitkeep
public/crossdomain.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
+<cross-domain-policy>
+ <!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
+
+ <!-- Most restrictive policy: -->
+ <site-control permitted-cross-domain-policies="none"/>
+
+ <!-- Least restrictive policy: -->
+ <!--
+ <site-control permitted-cross-domain-policies="all"/>
+ <allow-access-from domain="*" to-ports="*" secure="false"/>
+ <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
+ -->
+</cross-domain-policy>
public/robots.txt
@@ -0,0 +1,3 @@
+# robotstxt.org/
+
+User-agent: *
tests/helpers/resolver.js
@@ -0,0 +1,11 @@
+import Resolver from 'ember/resolver';
+import config from '../../config/environment';
+
+var resolver = Resolver.create();
+
+resolver.namespace = {
+ modulePrefix: config.modulePrefix,
+ podModulePrefix: config.podModulePrefix
+};
+
+export default resolver;
tests/helpers/start-app.js
@@ -0,0 +1,25 @@
+import Ember from 'ember';
+import Application from '../../app';
+import Router from '../../router';
+import config from '../../config/environment';
+
+export default function startApp(attrs) {
+ var App;
+
+ var attributes = Ember.merge({}, config.APP);
+ attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
+
+ Router.reopen({
+ location: 'none'
+ });
+
+ Ember.run(function() {
+ App = Application.create(attributes);
+ App.setupForTesting();
+ App.injectTestHelpers();
+ });
+
+ App.reset(); // this shouldn't be needed, i want to be able to "start an app at a specific URL"
+
+ return App;
+}
tests/unit/.gitkeep
tests/.jshintrc
@@ -0,0 +1,74 @@
+{
+ "predef": [
+ "document",
+ "window",
+ "location",
+ "setTimeout",
+ "$",
+ "-Promise",
+ "QUnit",
+ "define",
+ "console",
+ "equal",
+ "notEqual",
+ "notStrictEqual",
+ "test",
+ "asyncTest",
+ "testBoth",
+ "testWithDefault",
+ "raises",
+ "throws",
+ "deepEqual",
+ "start",
+ "stop",
+ "ok",
+ "strictEqual",
+ "module",
+ "moduleFor",
+ "moduleForComponent",
+ "moduleForModel",
+ "process",
+ "expect",
+ "visit",
+ "exists",
+ "fillIn",
+ "click",
+ "keyEvent",
+ "triggerEvent",
+ "find",
+ "findWithAssert",
+ "wait",
+ "DS",
+ "isolatedContainer",
+ "startApp",
+ "andThen",
+ "currentURL",
+ "currentPath",
+ "currentRouteName"
+ ],
+ "node": false,
+ "browser": false,
+ "boss": true,
+ "curly": false,
+ "debug": false,
+ "devel": false,
+ "eqeqeq": true,
+ "evil": true,
+ "forin": false,
+ "immed": false,
+ "laxbreak": false,
+ "newcap": true,
+ "noarg": true,
+ "noempty": false,
+ "nonew": false,
+ "nomen": false,
+ "onevar": false,
+ "plusplus": false,
+ "regexp": false,
+ "undef": true,
+ "sub": true,
+ "strict": false,
+ "white": false,
+ "eqnull": true,
+ "esnext": true
+}
tests/index.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>Cakery Tests</title>
+ <meta name="description" content="">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ {{content-for 'head'}}
+ {{content-for 'test-head'}}
+
+ <link rel="stylesheet" href="assets/vendor.css">
+ <link rel="stylesheet" href="assets/cakery.css">
+ <link rel="stylesheet" href="assets/test-support.css">
+ <style>
+ #ember-testing-container {
+ position: absolute;
+ background: white;
+ bottom: 0;
+ right: 0;
+ width: 640px;
+ height: 384px;
+ overflow: auto;
+ z-index: 9999;
+ border: 1px solid #ccc;
+ }
+ #ember-testing {
+ zoom: 50%;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture"></div>
+
+ {{content-for 'body'}}
+ {{content-for 'test-body'}}
+ <script src="assets/vendor.js"></script>
+ <script src="assets/test-support.js"></script>
+ <script src="assets/cakery.js"></script>
+ <script src="testem.js"></script>
+ <script src="assets/test-loader.js"></script>
+ </body>
+</html>
tests/test-helper.js
@@ -0,0 +1,12 @@
+import resolver from './helpers/resolver';
+import {
+ setResolver
+} from 'ember-qunit';
+
+setResolver(resolver);
+
+document.write('<div id="ember-testing-container"><div id="ember-testing"></div></div>');
+
+QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container'});
+var containerVisibility = QUnit.urlParams.nocontainer ? 'hidden' : 'visible';
+document.getElementById('ember-testing-container').style.visibility = containerVisibility;
vendor/.gitkeep
.bowerrc
@@ -0,0 +1,4 @@
+{
+ "directory": "bower_components",
+ "analytics": false
+}
.editorconfig
@@ -0,0 +1,33 @@
+# 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
+
+[*.js]
+indent_style = space
+indent_size = 2
+
+[*.hbs]
+indent_style = space
+indent_size = 2
+
+[*.css]
+indent_style = space
+indent_size = 2
+
+[*.html]
+indent_style = space
+indent_size = 2
+
+[*.md]
+trim_trailing_whitespace = false
.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
+}
.gitignore
@@ -0,0 +1,17 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+
+# dependencies
+/node_modules
+/bower_components
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage/*
+/libpeerconnection.log
+npm-debug.log
+testem.log
.jshintrc
@@ -0,0 +1,32 @@
+{
+ "predef": [
+ "document",
+ "window",
+ "-Promise"
+ ],
+ "browser" : true,
+ "boss" : true,
+ "curly": true,
+ "debug": false,
+ "devel": true,
+ "eqeqeq": true,
+ "evil": true,
+ "forin": false,
+ "immed": false,
+ "laxbreak": false,
+ "newcap": true,
+ "noarg": true,
+ "noempty": false,
+ "nonew": false,
+ "nomen": false,
+ "onevar": false,
+ "plusplus": false,
+ "regexp": false,
+ "undef": true,
+ "sub": true,
+ "strict": false,
+ "white": false,
+ "eqnull": true,
+ "esnext": true,
+ "unused": true
+}
.travis.yml
@@ -0,0 +1,16 @@
+---
+language: node_js
+
+sudo: false
+
+cache:
+ directories:
+ - node_modules
+
+install:
+ - npm install -g bower
+ - npm install
+ - bower install
+
+script:
+ - npm test
bower.json
@@ -0,0 +1,17 @@
+{
+ "name": "cakery",
+ "dependencies": {
+ "handlebars": "~1.3.0",
+ "jquery": "^1.11.1",
+ "ember": "1.7.0",
+ "ember-data": "1.0.0-beta.10",
+ "ember-resolver": "~0.1.7",
+ "loader.js": "stefanpenner/loader.js#1.0.1",
+ "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
+ "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
+ "ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
+ "ember-qunit": "0.1.8",
+ "ember-qunit-notifications": "0.0.4",
+ "qunit": "~1.15.0"
+ }
+}
Brocfile.js
@@ -0,0 +1,20 @@
+/* global require, module */
+
+var EmberApp = require('ember-cli/lib/broccoli/ember-app');
+
+var app = new EmberApp();
+
+// 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.
+
+module.exports = app.toTree();
package.json
@@ -0,0 +1,34 @@
+{
+ "name": "cakery",
+ "version": "0.0.0",
+ "private": true,
+ "directories": {
+ "doc": "doc",
+ "test": "tests"
+ },
+ "scripts": {
+ "start": "ember server",
+ "build": "ember build",
+ "test": "ember test"
+ },
+ "repository": "https://github.com/stefanpenner/ember-cli",
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "author": "",
+ "license": "MIT",
+ "devDependencies": {
+ "body-parser": "^1.2.0",
+ "broccoli-asset-rev": "0.3.1",
+ "broccoli-ember-hbs-template-compiler": "^1.6.1",
+ "ember-cli": "0.1.2",
+ "ember-cli-content-security-policy": "0.3.0",
+ "ember-export-application-global": "^1.0.0",
+ "ember-cli-ic-ajax": "0.1.1",
+ "ember-cli-inject-live-reload": "^1.3.0",
+ "ember-cli-qunit": "0.1.0",
+ "ember-data": "1.0.0-beta.10",
+ "express": "^4.8.5",
+ "glob": "^4.0.5"
+ }
+}
README.md
@@ -0,0 +1,51 @@
+# Cakery
+
+This README outlines the details of collaborating on this Ember application.
+
+A short introduction of this app could easily go here.
+
+## Prerequisites
+
+You will need the following things properly installed on your computer.
+
+* [Git](http://git-scm.com/)
+* [Node.js](http://nodejs.org/) (with NPM) and [Bower](http://bower.io/)
+
+## Installation
+
+* `git clone <repository-url>` this repository
+* change into the new directory
+* `npm install`
+* `bower install`
+
+## Running / Development
+
+* `ember server`
+* Visit your app at http://localhost:4200.
+
+### Code Generators
+
+Make use of the many generators for code, try `ember help generate` for more details
+
+### Running Tests
+
+* `ember test`
+* `ember test --server`
+
+### Building
+
+* `ember build` (development)
+* `ember build --environment production` (production)
+
+### Deploying
+
+Specify what it takes to deploy your app.
+
+## Further Reading / Useful Links
+
+* ember: http://emberjs.com/
+* ember-cli: http://www.ember-cli.com/
+* Development Browser Extensions
+ * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
+ * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
+
testem.json
@@ -0,0 +1,11 @@
+{
+ "framework": "qunit",
+ "test_page": "tests/index.html",
+ "launch_in_ci": [
+ "PhantomJS"
+ ],
+ "launch_in_dev": [
+ "PhantomJS",
+ "Chrome"
+ ]
+}