Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ember and deps #99

Merged
merged 10 commits into from
Apr 20, 2019
Merged
Show file tree
Hide file tree
Changes from 9 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
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/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
17 changes: 6 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ module.exports = {
{
files: [
'fastboot-server.js',
'testem.js',
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js'
'lib/*/index.js',
'server/**/*.js'
],
parserOptions: {
sourceType: 'script',
Expand All @@ -34,15 +38,6 @@ module.exports = {
browser: false,
node: true
}
},

// test files
{
files: ['tests/**/*.js'],
excludedFiles: ['tests/dummy/**/*.js'],
env: {
embertest: true
}
}
]
};
20 changes: 11 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
/tmp

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

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

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
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'
};
13 changes: 5 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '6'
- '10'
sudo: false
dist: trusty

Expand All @@ -10,23 +10,20 @@ addons:
cache:
yarn: true
directories:
- $HOME/.cache
- $HOME/.npm

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

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn
- npm install

script:
- yarn run lint:js
- yarn test
- npm run lint:js
- npm test

deploy:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove the deploy section (because it doesn't work) then we should be able to merge this and get the production website updated 👍

provider: heroku
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ To run the website locally:

### Running Tests

- `ember test`
* `ember test`
* `ember test --server`

### Building

* `ember build` (development)
* `ember build --environment production` (production)

### Deploying

Expand Down
4 changes: 2 additions & 2 deletions app/components/main-hero/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
</div>

<div class="main-hero-actions">
{{#link-to 'page' 'quickstart' class='main-hero-button'}}
{{#link-to "page" "quickstart" class="main-hero-button"}}
Quickstart
{{/link-to}}

{{#link-to 'page' 'docs/user-guide' class='main-hero-button'}}
{{#link-to "page" "docs/user-guide" class="main-hero-button"}}
User Guide
{{/link-to}}
</div>
Expand Down
2 changes: 2 additions & 0 deletions app/components/nav-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export default Component.extend({
classNameBindings: 'isOffTop',

didInsertElement() {
this._super(...arguments);

let $window = $(window);

$window.on('scroll', () => {
Expand Down
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{content-for "head"}}

<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/my-app.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/fastboot-website.css">

{{content-for "head-footer"}}
</head>
Expand Down
11 changes: 10 additions & 1 deletion app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL,
metrics: injectService(),
fastboot: injectService(),

didTransition() {
this._super(...arguments);
Expand All @@ -18,6 +19,10 @@ const Router = EmberRouter.extend({
},

_scrollPage() {
if (this.fastboot.isFastBoot) {
return;
}

run.scheduleOnce('afterRender', this, () => {
let position = 0;
let hash = window.location.hash;
Expand All @@ -33,11 +38,15 @@ const Router = EmberRouter.extend({
},

_trackPage() {
if (this.fastboot.isFastBoot) {
return;
}

run.scheduleOnce('afterRender', this, () => {
let page = document.location.pathname;
let title = this.getWithDefault('currentRouteName', 'unknown');

get(this, 'metrics').trackPage({ page, title });
this.metrics.trackPage({ page, title });
});
}
});
Expand Down
10 changes: 5 additions & 5 deletions app/templates/components/main-nav.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{fastboot-logo}}
<ul class="list-reset">
<li class="inline-block mr1">{{link-to 'Intro' 'index'}}</li>
<li class="inline-block mr1">{{link-to 'Quickstart' 'page' 'quickstart'}}</li>
<li class="inline-block mr1">{{link-to 'User Guide' 'page' 'docs/user-guide'}}</li>
<li class="inline-block mr1">{{link-to 'Deploying' 'page' 'docs/deploying'}}</li>
<li class="inline-block mr1">{{link-to 'Addon Author Guide' 'page' 'docs/addon-author-guide'}}</li>
<li class="inline-block mr1">{{link-to "Intro" "index"}}</li>
<li class="inline-block mr1">{{link-to "Quickstart" "page" "quickstart"}}</li>
<li class="inline-block mr1">{{link-to "User Guide" "page" "docs/user-guide"}}</li>
<li class="inline-block mr1">{{link-to "Deploying" "page" "docs/deploying"}}</li>
<li class="inline-block mr1">{{link-to "Addon Author Guide" "page" "docs/addon-author-guide"}}</li>
</ul>
3 changes: 1 addition & 2 deletions app/templates/components/nav-bar.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{#link-to 'index'}}
{{#link-to "index"}}
<h1>FastBoot</h1>
{{/link-to}}

2 changes: 1 addition & 1 deletion app/templates/components/route-error.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<h2>Try one of these:</h2>
<ul>
{{#each availablePages as |page|}}
<li>{{link-to page 'page' page}}</li>
<li>{{link-to page "page" page}}</li>
{{/each}}
</ul>
6 changes: 3 additions & 3 deletions app/templates/head.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Ember FastBoot" />
<meta name="twitter:description" content="Progressive enhancement for ambitious web apps" />
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Ember FastBoot">
<meta name="twitter:description" content="Progressive enhancement for ambitious web apps">
<meta name="twitter:image" content="/images/site-preview.png">
4 changes: 4 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ module.exports = function(environment) {
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
}
},

Expand Down
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
}
24 changes: 17 additions & 7 deletions config/targets.js
Original file line number Diff line number Diff line change
@@ -1,8 +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: [
'ie 9',
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
]
};
browsers
};
16 changes: 8 additions & 8 deletions fastboot-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const fastbootMiddleware = require('fastboot-express-middleware');
const staticGzip = require('express-serve-static-gzip');
const sabayon = require('express-sabayon');

var assetPath = 'tmp/deploy-dist'
var port = process.env.PORT || 3000;
const assetPath = 'tmp/deploy-dist'
const port = process.env.PORT || 3000;

// eslint-disable-next-line no-console
console.log('Booting Ember app...');
Expand All @@ -31,9 +31,9 @@ try {
// eslint-disable-next-line no-console
console.log('Ember app booted successfully.');
cluster(function() {
var app = express();
let app = express();

var fastboot = fastbootMiddleware(assetPath);
let fastboot = fastbootMiddleware(assetPath);

if (assetPath) {
app.get('/', fastboot);
Expand All @@ -44,10 +44,10 @@ cluster(function() {
app.get(sabayon.path, sabayon.middleware());
app.get('/*', fastboot);

var listener = app.listen(port, function() {
var host = listener.address().address;
var port = listener.address().port;
var family = listener.address().family;
let listener = app.listen(port, function() {
let host = listener.address().address;
let port = listener.address().port;
let family = listener.address().family;

if (family === 'IPv6') { host = '[' + host + ']'; }

Expand Down
Loading