Skip to content

Commit 2d6e68e

Browse files
authored
Merge pull request #599 from typed-ember/update-docs
Docs!
2 parents b185c1f + 865663a commit 2d6e68e

20 files changed

+4970
-1281
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@
3333
/.node_modules.ember-try/
3434
/bower.json.ember-try
3535
/package.json.ember-try
36+
/config/addon-docs.js

README.md

Lines changed: 131 additions & 713 deletions
Large diffs are not rendered by default.

config/addon-docs.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-env node */
2+
'use strict';
3+
4+
const AddonDocsConfig = require('ember-cli-addon-docs/lib/config');
5+
6+
module.exports = class extends AddonDocsConfig {
7+
// See https://ember-learn.github.io/ember-cli-addon-docs/docs/deploying
8+
// for details on configuration you can override here.
9+
};

config/deploy.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* eslint-env node */
2+
'use strict';
3+
4+
module.exports = function(deployTarget) {
5+
let ENV = {
6+
build: {}
7+
// include other plugin configuration that applies to all deploy targets here
8+
};
9+
10+
if (deployTarget === 'development') {
11+
ENV.build.environment = 'development';
12+
// configure other plugins for development deploy target here
13+
}
14+
15+
if (deployTarget === 'staging') {
16+
ENV.build.environment = 'production';
17+
// configure other plugins for staging deploy target here
18+
}
19+
20+
if (deployTarget === 'production') {
21+
ENV.build.environment = 'production';
22+
// configure other plugins for production deploy target here
23+
}
24+
25+
// Note: if you need to build some configuration asynchronously, you can return
26+
// a promise that resolves with the ENV object instead of returning the
27+
// ENV object synchronously.
28+
return ENV;
29+
};

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,16 @@
7070
"broccoli-asset-rev": "3.0.0",
7171
"co": "4.6.0",
7272
"ember-cli": "3.8.1",
73+
"ember-cli-addon-docs": "^0.6.5",
74+
"ember-cli-addon-docs-esdoc": "^0.2.1",
7375
"ember-cli-app-version": "3.2.0",
7476
"ember-cli-babel": "7.5.0",
7577
"ember-cli-blueprint-test-helpers": "0.19.2",
7678
"ember-cli-dependency-checker": "3.1.0",
79+
"ember-cli-deploy": "^1.0.2",
80+
"ember-cli-deploy-build": "^1.1.1",
81+
"ember-cli-deploy-git": "^1.3.3",
82+
"ember-cli-deploy-git-ci": "^1.0.1",
7783
"ember-cli-eslint": "5.1.0",
7884
"ember-cli-htmlbars": "3.0.1",
7985
"ember-cli-htmlbars-inline-precompile": "2.1.0",

tests/dummy/app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<title>Dummy</title>
6+
<title>Ember CLI TypeScript</title>
77
<meta name="description" content="">
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99

tests/dummy/app/router.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
import EmberRouter from '@ember/routing/router';
1+
import AddonDocsRouter, { docsRoute } from 'ember-cli-addon-docs/router';
22
import config from './config/environment';
33

4-
const Router = EmberRouter.extend({
4+
const Router = AddonDocsRouter.extend({
55
location: config.locationType,
66
rootURL: config.rootURL,
77
});
88

9-
Router.map(function() {});
9+
Router.map(function() {
10+
docsRoute(this, function() {
11+
this.route('upgrade-notes');
12+
this.route('configuration');
13+
this.route('ts-guide', function() {
14+
this.route('with-addons');
15+
this.route('using-ts-effectively');
16+
this.route('current-limitations');
17+
});
18+
});
19+
});
1020

1121
export default Router;

tests/dummy/app/styles/app.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:root {
2+
--brand-primary: rgb(41, 78, 128);
3+
}
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
<h2 id="title">Welcome to Ember</h2>
2-
3-
This is code from ember-cli-typescript's test application.
4-
5-
{{ts-component}}
6-
7-
{{js-importing-ts}}
1+
{{outlet}}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Why TypeScript?
2+
3+
<aside>Just want to dive in? {{docs-link (html-safe 'Click here &rarr;') 'docs.index'}}</aside>
4+
5+
What is TypeScript, and why should you adopt it?
6+
7+
> TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
8+
> &mdash;[typescriptlang.org](http://www.typescriptlang.org)
9+
10+
TypeScript lets you build *ambitious web applications* with confidence&mdash;so it’s a perfect fit for Ember apps!
11+
12+
- Get rid of `undefined is not a function` and `null is not an object` once and for all.
13+
- Enjoy API docs… that are always up-to-date.
14+
- Experience better developer productivity through top-notch editor support, including incredible autocomplete, guided refactorings, automatic imports, and more.
15+

0 commit comments

Comments
 (0)