Permalink
Browse files

Merge pull request #51 from ga-wdi-boston/024/master

024/master
  • Loading branch information...
caleb-pearce committed May 9, 2018
2 parents 4104c2d + de1a772 commit ec1d426e9d9fa4b184b069ff6c4da463f522e752
@@ -6,5 +6,5 @@
Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": true,
"port": 7165 // +('GA'.split('').reduce((p, c)=> p + c.charCodeAt(), ''));
"port": 7165
}
@@ -0,0 +1 @@
node_modules/
@@ -0,0 +1,11 @@
{
"extends": "standard",
"root": true,
"env": {
"node": true
},
"rules": {
"prefer-const": "error",
"no-var": "error"
}
}
15 .jscsrc

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -1,12 +1,12 @@
'use strict';
'use strict'

// http://ericnish.io/blog/how-to-neatly-separate-grunt-files
// http://www.html5rocks.com/en/tutorials/tooling/supercharging-your-gruntfile/
// discuss how to break up gruntfiles

module.exports = function(grunt) {

require('time-grunt')(grunt);
require('load-grunt-config')(grunt);
require('time-grunt')(grunt)
require('load-grunt-config')(grunt)

};
}
@@ -6,9 +6,9 @@
**Location**: `app/app.js` at line 8

```js
let App;
let App
Ember.MODEL_FACTORY_INJECTIONS = true;
Ember.MODEL_FACTORY_INJECTIONS = true
App = Ember.Application.extend({
```
@@ -2,8 +2,9 @@

# ember-template

A template for starting projects with Ember as a client. Build pipeline and
development server provided by `ember-cli`. Bootstrap and Sass included.
A template for starting lessons with Ember as a client. Build pipeline and development server provided by `ember-cli`. Bootstrap and Sass included.

*Note* This is not a project template.

## Updating Dependencies

@@ -29,21 +30,6 @@ At the beginning of each cohort, update this template by upgrading `ember-cli`
and generating a new Ember application in another location. Copy files over a
handful at a time and check diffs.

## Installation

1. [Download](../../archive/master.zip) this template.
1. Unzip and rename the template directory.
1. Empty [`README.md`](README.md) and fill with your own content.
1. Move into the new project and `git init`.
1. Replace all instances of `'ga-wdi-boston.ember-template'` with your app name. This
includes [`package.json`](package.json),
[`app/index.html`](app/index.html), [`tests/index.html`](tests/index.html),
[`app/adapters/application.js`](app/adapters/application.js),
and [`config/environment.js`](config/environment.js), possibly others.
1. Install dependencies with `npm install`.
1. Run the development server with `ember server`. Use the `--proxy` flag to
avoid writing development-specific CORS and CSP settings.

## Structure

Build dependencies are stored in [`package.json`](package.json).
@@ -1,6 +1,6 @@
import ENV from 'ga-wdi-boston.ember-template/config/environment';
import ActiveModelAdapter from 'active-model-adapter';
import ENV from 'ga-wdi-boston.ember-template/config/environment'
import ActiveModelAdapter from 'active-model-adapter'

export default ActiveModelAdapter.extend({
host: ENV.apiHost,
});
host: ENV.apiHost
})
@@ -1,19 +1,19 @@
import Application from '@ember/application';
import Ember from 'ember';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import Application from '@ember/application'
import Ember from 'ember'
import Resolver from './resolver'
import loadInitializers from 'ember-load-initializers'
import config from './config/environment'

let App;
let App

Ember.MODEL_FACTORY_INJECTIONS = true;
Ember.MODEL_FACTORY_INJECTIONS = true

App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
});
})

loadInitializers(App, config.modulePrefix);
loadInitializers(App, config.modulePrefix)

export default App;
export default App
@@ -1,3 +1,3 @@
import Resolver from 'ember-resolver';
import Resolver from 'ember-resolver'

export default Resolver;
export default Resolver
@@ -1,12 +1,12 @@
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
import EmberRouter from '@ember/routing/router'
import config from './config/environment'

const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});
})

Router.map(function() {
});
Router.map(function () {
})

export default Router;
export default Router
@@ -1,4 +1,4 @@
import Service from '@ember/service';
import Service from '@ember/service'

export default Service.extend({
});
})
@@ -1 +1 @@
@import "ember-bootstrap/bootstrap";
@import "ember-bootstrap/bootstrap"
@@ -1,7 +1,6 @@
/* jshint node: true */

module.exports = function (environment) {
'use strict';
'use strict'

const ENV = {
modulePrefix: 'ga-wdi-boston.ember-template',
environment: environment,
@@ -22,35 +21,32 @@ module.exports = function (environment) {
// 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;
let port = +('GA'.split('').reduce((p, c) =>
p + c.charCodeAt().toString(16), '')
);
ENV.apiHost = `http://localhost:${port}`;
// 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
ENV.apiHost = 'http://localhost:4741'
}

if (environment === 'test') {
// Testem prefers this...
ENV.rootUrl = '/';
ENV.locationType = 'none';
ENV.rootUrl = '/'
ENV.locationType = 'none'

// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.LOG_ACTIVE_GENERATION = false
ENV.APP.LOG_VIEW_LOOKUPS = false

ENV.APP.rootElement = '#ember-testing';
ENV.APP.rootElement = '#ember-testing'
}

if (environment === 'production') {
ENV.locationType = 'hash';
ENV.locationType = 'hash'
}

return ENV;
};
return ENV
}
@@ -1,14 +1,21 @@
/*jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
const EmberApp = require('ember-cli/lib/broccoli/ember-app')

module.exports = function(defaults) {
var app = new EmberApp(defaults, {
const app = new EmberApp(defaults, {
'ember-bootstrap': {
// https://www.ember-bootstrap.com/#/getting-started/setup
'bootstrapVersion': 3,
// Include the Glyphicons font
// Only applicable for Bootstrap 3
// True if Bootstrap 3
'importBootstrapFont': true,
// Include the default static bootstrap.css
// Only applicable when not using a preprocessor
// True if no preprocessor
// Set to false since using sass
'importBootstrapCSS': false
}
});
return app.toTree();
};
})
return app.toTree()
}
@@ -1,6 +1,7 @@
{
"default": ["nag"],
"nag": ["jshint", "jsonlint:all", "jscs:status"],
"make-standard": ["eslint:fix"],
"nag": ["eslint:all", "jsonlint:all"],
"deploy": [
"shell:git-is-clean",
"shell:git-checkout-master",
@@ -10,6 +11,5 @@
"shell:deploy-publish",
"shell:clean-gh-pages",
"shell:return-to-master"
],
"reformat": ["jscs:write"]
]
}
@@ -0,0 +1,12 @@
{
"all": {
"src": ["<%= paths.src.all %>"]
},

"fix": {
"src": ["<%= paths.src.all %>"],
"options": {
"fix": true
}
}
}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -1,4 +1,10 @@
{
"src": {
"all": [
"app/**/*.js",
"tests/**/*.js"
]
},
"scripts": {
"all": [
"app/**/*.js",
Oops, something went wrong.

0 comments on commit ec1d426

Please sign in to comment.