Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .alexrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"allow": [
"host-hostess",
"watchman-watchwoman",
"disabled",
"hook",
"hooks",
"executed",
"execute",
"failure",
"failures",
"dive"
]
}
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
9 changes: 9 additions & 0 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -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
}
20 changes: 20 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
/node_modules/
42 changes: 42 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* eslint-env node */

module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
},
overrides: [
// node files
{
files: [
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
}
}
]
};
15 changes: 0 additions & 15 deletions .eslintrc.json

This file was deleted.

25 changes: 23 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
.DS_Store
node_modules
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.sass-cache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
8 changes: 8 additions & 0 deletions .netlifyheaders
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*/
Cache-Control: public, max-age=3600

/content/*
Cache-Control: public, max-age=3600

/assets/*
Cache-Control: public, max-age=31536000
2 changes: 2 additions & 0 deletions .netlifyredirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/ /release/
/* /_empty.html 404
5 changes: 5 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended'
};
30 changes: 29 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
---
language: node_js
node_js:
- '8'
- "6"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
directories:
- $HOME/.npm

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1

before_install:
- npm config set spin false
- npm i -g npm@6

script:
- set -o errexit
- npm run lint:md
- npm run lint:alex
- npm run lint:hbs
- npm run lint:js
- npm test
3 changes: 3 additions & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}
14 changes: 14 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

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

loadInitializers(App, config.modulePrefix);

export default App;
24 changes: 24 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for "head"}}

<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/@ember-learn/tutorial-source.css">

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

<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/@ember-learn/tutorial-source.js"></script>

{{content-for "body-footer"}}
</body>
</html>
3 changes: 3 additions & 0 deletions app/resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Resolver from 'ember-resolver';

export default Resolver;
12 changes: 12 additions & 0 deletions app/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import EmberRouter from '@ember/routing/router';
import config from './config/environment';

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

Router.map(function() {
});

export default Router;
Empty file added app/styles/app.css
Empty file.
61 changes: 61 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
'use strict';

module.exports = function(environment) {
let ENV = {
modulePrefix: '@ember-learn/tutorial-source',
environment,
rootURL: '/',
locationType: 'trailing-history',
historySupportMiddleware: true,

EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false
}
},

APP: {
// Here you can pass flags/options to your application instance
// when it is created
},

'ember-meta': {
description: 'Ember Tutorials'
},

guidemaker: {
title: 'Ember Tutorials'
}
};

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.locationType = 'none';

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

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

if (environment === 'production') {
// here you can enable a production-specific feature
}

return ENV;
};
3 changes: 3 additions & 0 deletions config/optional-features.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"jquery-integration": true
}
18 changes: 18 additions & 0 deletions config/targets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

const browsers = [
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
];

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
}

module.exports = {
browsers
};
26 changes: 26 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use strict';

const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
let app = new EmberApp(defaults, {
fingerprint: {
extensions: ['js', 'css', 'map']
}
});

// 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.

return app.toTree();
};
6 changes: 3 additions & 3 deletions guides/contact-book/setting-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ necessary for you to start using Ember to build ambitious web apps, including:
This tutorial is meant to build an Ember.js app progressively, starting
small and adding concepts over time. If you're new to Single Page App
development, this is the best guide to start with. If you've used Ember before and want a refresher,
check out the [Super Rentals Tutorial](../../tutorial/ember-cli) for something more fast paced.
check out the [Super Rentals Tutorial](../../super-rentals/) for something more fast paced.

## What You'll Build

Here's a mockup of the design we'll be shooting for as we build the Contact Book
Here's a mockup of the design we'll be aiming for as we build the Contact Book
application:

This app is meant to be allow users to manage and search through their contact
Expand All @@ -40,7 +40,7 @@ and JavaScript. If you haven't ever used any of these before, you should
probably start with the following guides: (@todo: Add recommendations here)

You'll need to have Git, Node.js, and NPM installed on your computer for this
tutorial. Checkout the [Installing Ember](../../getting-started) guide for more
tutorial. Checkout the [Installing Ember](https://guides.emberjs.com/release/getting-started/) guide for more
details.

You'll also need a modern web browser. We'll be making use of some of the latest
Expand Down
Loading