Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 6afe21c

Browse files
committed
docs(cookbook/graphql): add a post-rollup script to copy statis assets
1 parent c497e63 commit 6afe21c

38 files changed

+236
-187
lines changed

public/docs/_examples/heroes-graphql/ts/aot/bs-config.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

public/docs/_examples/heroes-graphql/ts/aot/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
<my-app>Loading...</my-app>
2020
</body>
2121
<script src="dist/build.js"></script>
22-
</html>
22+
</html>
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
/* #docregion , quickstart, toh */
2+
/* Master Styles */
3+
h1 {
4+
color: #369;
5+
font-family: Arial, Helvetica, sans-serif;
6+
font-size: 250%;
7+
}
8+
h2, h3 {
9+
color: #444;
10+
font-family: Arial, Helvetica, sans-serif;
11+
font-weight: lighter;
12+
}
13+
body {
14+
margin: 2em;
15+
}
16+
/* #enddocregion quickstart */
17+
body, input[text], button {
18+
color: #888;
19+
font-family: Cambria, Georgia;
20+
}
21+
/* #enddocregion toh */
22+
a {
23+
cursor: pointer;
24+
cursor: hand;
25+
}
26+
button {
27+
font-family: Arial;
28+
background-color: #eee;
29+
border: none;
30+
padding: 5px 10px;
31+
border-radius: 4px;
32+
cursor: pointer;
33+
cursor: hand;
34+
}
35+
button:hover {
36+
background-color: #cfd8dc;
37+
}
38+
button:disabled {
39+
background-color: #eee;
40+
color: #aaa;
41+
cursor: auto;
42+
}
43+
44+
/* Navigation link styles */
45+
nav a {
46+
padding: 5px 10px;
47+
text-decoration: none;
48+
margin-right: 10px;
49+
margin-top: 10px;
50+
display: inline-block;
51+
background-color: #eee;
52+
border-radius: 4px;
53+
}
54+
nav a:visited, a:link {
55+
color: #607D8B;
56+
}
57+
nav a:hover {
58+
color: #039be5;
59+
background-color: #CFD8DC;
60+
}
61+
nav a.active {
62+
color: #039be5;
63+
}
64+
65+
/* items class */
66+
.items {
67+
margin: 0 0 2em 0;
68+
list-style-type: none;
69+
padding: 0;
70+
width: 24em;
71+
}
72+
.items li {
73+
cursor: pointer;
74+
position: relative;
75+
left: 0;
76+
background-color: #EEE;
77+
margin: .5em;
78+
padding: .3em 0;
79+
height: 1.6em;
80+
border-radius: 4px;
81+
}
82+
.items li:hover {
83+
color: #607D8B;
84+
background-color: #DDD;
85+
left: .1em;
86+
}
87+
.items li.selected {
88+
background-color: #CFD8DC;
89+
color: white;
90+
}
91+
.items li.selected:hover {
92+
background-color: #BBD8DC;
93+
}
94+
.items .text {
95+
position: relative;
96+
top: -3px;
97+
}
98+
.items .badge {
99+
display: inline-block;
100+
font-size: small;
101+
color: white;
102+
padding: 0.8em 0.7em 0 0.7em;
103+
background-color: #607D8B;
104+
line-height: 1em;
105+
position: relative;
106+
left: -1px;
107+
top: -4px;
108+
height: 1.8em;
109+
margin-right: .8em;
110+
border-radius: 4px 0 0 4px;
111+
}
112+
/* #docregion toh */
113+
/* everywhere else */
114+
* {
115+
font-family: Arial, Helvetica, sans-serif;
116+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"open": false,
3+
"logLevel": "silent",
4+
"port": 8080,
5+
"server": {
6+
"baseDir": "aot",
7+
"routes": {
8+
"/node_modules": "node_modules"
9+
},
10+
"middleware": {
11+
"0": null
12+
}
13+
}
14+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"description": "Tour of Heroes: GraphQL",
3+
"basePath": "src/",
34
"files":[
45
"!**/*.d.ts",
56
"!**/*.js",
67
"!**/*.[1,2].*",
78
"systemjs.config.extras.js"
89
],
910
"tags": ["tutorial", "tour", "heroes", "http", "GraphQL"]
10-
}
11+
}

public/docs/_examples/heroes-graphql/ts/rollup-config.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,24 @@ import uglify from 'rollup-plugin-uglify'
66

77
import builtins from 'rollup-plugin-node-builtins';
88
import globals from 'rollup-plugin-node-globals';
9-
109
//paths are relative to the execution path
1110
export default {
12-
entry: 'app/main-aot.js',
11+
entry: 'src/main-aot.js',
1312
dest: 'aot/dist/build.js', // output a single application bundle
1413
sourceMap: true,
1514
sourceMapFile: 'aot/dist/build.js.map',
1615
format: 'iife',
16+
onwarn: function(warning) {
17+
// Skip certain warnings
18+
19+
// should intercept ... but doesn't in some rollup versions
20+
if ( warning.code === 'THIS_IS_UNDEFINED' ) { return; }
21+
// intercepts in some rollup versions
22+
if ( warning.indexOf("The 'this' keyword is equivalent to 'undefined'") > -1 ) { return; }
23+
24+
// console.warn everything else
25+
console.warn( warning.message );
26+
},
1727
plugins: [
1828
nodeResolve({jsnext: true, module: true, browser: true}),
1929
commonjs({
@@ -41,4 +51,4 @@ export default {
4151
builtins(),
4252
uglify()
4353
]
44-
}
54+
}

0 commit comments

Comments
 (0)