Skip to content

Commit e3712c5

Browse files
committed
update readies, deps
1 parent 5451050 commit e3712c5

9 files changed

Lines changed: 136 additions & 500 deletions

File tree

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
[![npm version](https://badge.fury.io/js/ember-cli-fastboot.svg)](https://badge.fury.io/js/ember-cli-fastboot)
44
[![Actions Status](https://github.com/ember-fastboot/ember-cli-fastboot/workflows/CI/badge.svg)](https://github.com/ember-fastboot/ember-cli-fastboot/actions)
55

6-
An Ember CLI addon that allows you to render and serve Ember.js apps on
7-
the server. Using FastBoot, you can serve rendered HTML to browsers and
6+
FastBoot allows you to render and serve Ember.js apps on the server.
7+
Using FastBoot, you can serve rendered HTML to browsers and
88
other clients without requiring them to download JavaScript assets.
99

1010
Currently, the set of Ember applications supported is extremely limited.
@@ -20,7 +20,7 @@ FastBoot requires Ember 2.3 or higher. It is also preferable that your app is ru
2020

2121
From within your Ember CLI application, run the following command:
2222

23-
```
23+
```sh
2424
ember install ember-cli-fastboot
2525
```
2626

@@ -35,13 +35,13 @@ You may be shocked to learn that minified code runs faster in Node than
3535
non-minified code, so you will probably want to run the production
3636
environment build for anything "serious."
3737

38-
```
38+
```sh
3939
ember serve --environment production
4040
```
4141

4242
You can also specify the port (default is 4200):
4343

44-
```
44+
```sh
4545
ember serve --port 8088
4646
```
4747

@@ -72,11 +72,11 @@ module.exports = function(environment) {
7272
}
7373
```
7474

75-
There are several options available, see FastBoot's [README](https://github.com/ember-fastboot/fastboot/tree/v2.0.3#usage) for more information, but be aware that `distPath` is provided internally by `ember-cli-fastboot`, hence it can not be modified by this file.
75+
There are several options available, see FastBoot's [README](./packages/fastboot/#usage) for more information, but be aware that `distPath` is provided internally by `ember-cli-fastboot`, hence it can not be modified by this file.
7676

7777
### FastBoot App Server Configuration
7878

79-
When using FastBoot App Server for production environment you have to manually pass options from `config/fastboot.js` file.
79+
When using [FastBoot App Server](./packages/fastboot-app-server/README.md) for production environment you have to manually pass options from `config/fastboot.js` file.
8080

8181
```js
8282
const FastBootAppServer = require('fastboot-app-server');
@@ -360,9 +360,8 @@ The contents of the Shoebox are written to the HTML as strings within
360360
consumed by the browser rendered application.
361361

362362
This looks like:
363+
363364
```html
364-
.
365-
.
366365
<script type="fastboot/shoebox" id="shoebox-main-store">
367366
{"data":[{"attributes":{"name":"AEC Professionals"},"id":106,"type":"audience"},
368367
{"attributes":{"name":"Components"},"id":111,"type":"audience"},
@@ -371,8 +370,6 @@ This looks like:
371370
{"attributes":{"name":"Staff"},"id":141,"type":"audience"},
372371
{"attributes":{"name":"Students"},"id":146,"type":"audience"}]}
373372
</script>
374-
.
375-
.
376373
```
377374

378375
You can add items into the shoebox with `shoebox.put`, and you can retrieve
@@ -415,7 +412,7 @@ Shoebox gives you great capabilities, but using it in the real app is pretty rou
415412
One way to abstract the shoebox data storage mechanics is to move the logic into
416413
the Application Adapter as shown below.
417414

418-
```
415+
```js
419416
export default class ApplicationAdapter extends JSONAPIAdapter.extend(
420417
// ...snip...
421418

@@ -448,6 +445,7 @@ export default class ApplicationAdapter extends JSONAPIAdapter.extend(
448445
}
449446
}
450447
```
448+
451449
With this strategy, any time an ember-data `findRecord` request happens while in
452450
Fastboot mode, the record will be put into the shoebox cache and returned. When
453451
subsequent calls are made for that record in the hydrated application, it will

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"test-packages/*"
1111
],
1212
"devDependencies": {
13-
"release-it": "^14.0.2",
14-
"release-it-lerna-changelog": "^2.4.0",
15-
"release-it-yarn-workspaces": "^1.5.0"
13+
"release-it": "^14.2.2",
14+
"release-it-lerna-changelog": "^3.1.0",
15+
"release-it-yarn-workspaces": "^2.0.0"
1616
},
1717
"publishConfig": {
1818
"registry": "https://registry.npmjs.org"
@@ -29,7 +29,8 @@
2929
],
3030
"additionalManifests": {
3131
"versionUpdates": [
32-
"package.json"
32+
"package.json",
33+
"test-packages/*/package.json"
3334
],
3435
"dependencyUpdates": [
3536
"package.json",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ember Cli FastBoot
2+
3+
See the [main readme](../../README.md) or http://ember-fastboot.com/ for more information.

packages/ember-cli-fastboot/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"scripts": {
1616
"build": "ember build",
17-
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
17+
"lint:js": "eslint ./*.js addon app fastboot config lib tests",
1818
"release": "release-it",
1919
"start": "ember serve",
2020
"test": "mocha && ember test",
@@ -54,7 +54,6 @@
5454
"ember-cli": "~3.3.0",
5555
"ember-cli-addon-tests": "^0.11.1",
5656
"ember-cli-dependency-checker": "^3.2.0",
57-
"ember-cli-eslint": "^4.2.3",
5857
"ember-cli-htmlbars": "^3.0.0",
5958
"ember-cli-htmlbars-inline-precompile": "^1.0.3",
6059
"ember-cli-inject-live-reload": "^1.8.2",

packages/fastboot-app-server/test/app-server-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const request = require('request-promise').defaults({ simple: false, r
99
let server;
1010

1111
describe("FastBootAppServer", function() {
12-
this.timeout(3000);
12+
this.timeout(10000);
1313

1414
afterEach(function() {
1515
if (server) {

packages/fastboot-express-middleware/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Build Status](https://travis-ci.org/ember-fastboot/fastboot-express-middleware.svg?branch=master)](https://travis-ci.org/ember-fastboot/fastboot-express-middleware)
66

77
This middleware is a small wrapper around the
8-
[fastboot](https://github.com/ember-fastboot/fastboot) package, which
8+
[fastboot](../fastboot/README.md) package, which
99
renders Ember.js apps in Node.js.
1010

1111
By adding this middleware to your Express app, you can serve HTML from a
@@ -16,7 +16,7 @@ Note that this is _just an Express middleware_ and there is more needed
1616
to serve apps in a production environment. If you want to server-side
1717
rendered Ember applications without doing a lot of work, you are
1818
recommended to consider the [FastBoot App
19-
Server](https://github.com/ember-fastboot/fastboot-app-server), which
19+
Server](../fastboot-app-server/README.md), which
2020
manages many of the hard parts for you.
2121

2222
That said, this middleware is designed to be easy to integrate for those
@@ -41,7 +41,7 @@ app.listen(3000, function () {
4141
## Building Your Ember App
4242

4343
Before you can use your app with FastBoot, you must first install the
44-
[ember-cli-fastboot][ember-cli-fastboot] addon and build your app by
44+
[ember-cli-fastboot](../ember-cli-fastboot) addon and build your app by
4545
running `ember build`. The build process will compile your app into a
4646
version that is compatible with both Node.js and the browser and put it
4747
in the `dist` directory. This `dist` directory is the path you should

packages/fastboot/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ prerequisite for developing FastBoot apps.
1414

1515
To serve server-rendered versions of your Ember app over HTTP, see the
1616
[FastBoot App
17-
Server](https://github.com/ember-fastboot/fastboot-app-server).
17+
Server](../fastboot-app-server/README.md).
1818

1919
## Usage
2020

@@ -112,8 +112,7 @@ for detailed logging.
112112

113113
The result from `fastboot` is a `Result` object that has the following API:
114114

115-
```
116-
115+
```TypeScript
117116
type DOMContents = () => {
118117
/**
119118
The `<head>` contents generated by the visit.
@@ -161,9 +160,8 @@ The contents of the Shoebox are written to the HTML as strings within
161160
by the browser rendered application.
162161

163162
This looks like:
163+
164164
```html
165-
.
166-
.
167165
<script type="fastboot/shoebox" id="shoebox-main-store">
168166
{"data":[{"attributes":{"name":"AEC Professionals"},"id":106,"type":"audience"},
169167
{"attributes":{"name":"Components"},"id":111,"type":"audience"},
@@ -176,6 +174,4 @@ This looks like:
176174
{"attributes":{"name":"Staff"},"id":141,"type":"audience"},
177175
{"attributes":{"name":"Students"},"id":146,"type":"audience"}]}
178176
</script>
179-
.
180-
.
181177
```

packages/fastboot/test/fastboot-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ describe('FastBoot', function() {
5050
expect(fn).to.throw(/(.+)package.json was malformed or did not contain a fastboot config/);
5151
});
5252

53-
5453
it('can render HTML with array of app files defined in package.json', function() {
5554
var fastboot = new FastBoot({
5655
distPath: fixture('multiple-app-files'),

0 commit comments

Comments
 (0)