Skip to content

Commit

Permalink
Merge pull request #99 from kiwiupover/update-ember-and-deps
Browse files Browse the repository at this point in the history
Update ember and deps
  • Loading branch information
mansona authored Apr 20, 2019
2 parents 6c80659 + 8643319 commit 3efdaf2
Show file tree
Hide file tree
Showing 28 changed files with 16,878 additions and 10,097 deletions.
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'
};
21 changes: 5 additions & 16 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,28 +10,17 @@ 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

deploy:
provider: heroku
api_key:
secure: iduQwr4SumssmTXAsg2DSgwpmrL7PTf01uk0cqETBG1y2puGswAiWyNSHiswHWFhpvFhCQDkcG+S4L2Geq7luOFhBXcUWpDO6ZuN2mj+MnpFfGbQMNbXF9OwZrkyzPgi3R4cQbm7wrvvGQYBhCC0JMdgl3w+GjfofgxOYNaWtBVlLkXaFz5EylD9pr3OYjIYPt7rT/8E3R2TBqrDxhESXYm+SKSUti8QX4AugsDA9vAr562kjzze0LYMmnyUVSeoBUtj4wBoEY9/z+3tAS6SpUxpivJKEuJXK4b+iZT0hPokAp5SJXH6hsZDK3QrjAvAZcaNgcwLnV7HyLtpYZjZ39O75FNoRcXDjP/pEkiKwx5X+KLEYjH/+vM9JIYJaiRpjeETIb3KjJBKYejT++d0NQP1gdOxgtRvZIMYAGc5TAjiKUFH0MjEXjGo0pfT2lv9/eif5yFbf11wO8i7YzUQaTvBCRy8PKG7ah1kDOlfMGf3H8Vy6QHD5fEgVbcgaGh/0t51iTSVt7JaB8SEBdKRx3fhNoSQAsyzAaNA8Hx+CgIXE0Spt2qhV5VQc2hgAYEwUeNj3zfCo1zRUkRzpYOLH8Vrl0ViB136Kjox+AdFMbRpAp89ePBZnces/xDkANTf3RfUNHV5rQjn57fpLwI/fcV7Rclo7k0cmMWoZE2BhOk=
app: fastboot-website
on:
repo: ember-fastboot/fastboot-website
- npm run lint:js
- npm test
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
3 changes: 3 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
},
"WORKER_COUNT": {
"required": true
},
"EXPERIMENTAL_RENDER_MODE_SERIALIZE": {
"required": true
}
},
"formation": {
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

0 comments on commit 3efdaf2

Please sign in to comment.