Skip to content

Commit 5c8fcf1

Browse files
valorkinOleksandr Telnov
authored andcommitted
feat(demo): new build process with ng2-webpack-config
1 parent 0c9bb0d commit 5c8fcf1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+562
-532
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ npm-debug.log
1515
/dist
1616
/coverage
1717
/ts
18+
/doc
1819

1920
# ignore incline compiling
2021
/demo/**/*.js

.ng2-config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* eslint no-var:0 */
2+
'use strict';
3+
var pkg = require('./package.json');
4+
5+
module.exports = {
6+
// metadata
7+
title: pkg.description,
8+
baseUrl: '/',
9+
// root folder name
10+
src: 'demo',
11+
dist: 'demo-build',
12+
htmlIndexes: ['index.html', 'index-bs4.html'],
13+
// karma bundle src
14+
spec: './spec-bundle.js',
15+
// webpack entry
16+
entry: {
17+
polyfills: './demo/polyfills.ts',
18+
vendor: './demo/vendor.ts',
19+
main: './demo/index.ts'
20+
},
21+
commonChunks: {
22+
name: ['polyfills', 'vendor'].reverse()
23+
},
24+
// webpack alias
25+
alias: {},
26+
copy: [
27+
{from: 'demo/favicon.ico', to: 'favicon.ico'},
28+
{from: 'demo/assets', to: 'assets'}
29+
]
30+
};

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ test.bundle.js
1111
coverage
1212

1313
# demo build
14+
doc
1415
demo
1516
demo-build
1617
webpack.config.js

components/rating/rating.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class RatingComponent implements ControlValueAccessor, OnInit {
2828
@Input() public stateOff:string;
2929
@Input() public readonly:boolean;
3030
@Input() public titles:Array<string>;
31-
@Input() public ratingStates:Array<{stateOn:string, stateOff:string}>;
31+
@Input() public ratingStates:{stateOn:string, stateOff:string}[];
3232

3333
@Output() public onHover:EventEmitter<number> = new EventEmitter(false);
3434
@Output() public onLeave:EventEmitter<number> = new EventEmitter(false);

components/rating/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class RatingComponent implements ControlValueAccessor, OnInit {
1818
@Input() private stateOff:string;
1919
@Input() private readonly:boolean;
2020
@Input() private titles:Array<string>;
21-
@Input() private ratingStates:Array<{stateOn:string, stateOff:string}>;
21+
@Input() private ratingStates:{stateOn:string, stateOff:string}[];
2222

2323
@Output() private onHover:EventEmitter<number> = new EventEmitter(false);
2424
@Output() private onLeave:EventEmitter<number> = new EventEmitter(false);
@@ -31,7 +31,7 @@ export class RatingComponent implements ControlValueAccessor, OnInit {
3131
- `titles` (`?Array<string>`) - array of icons titles, default: (`["one", "two", "three", "four", "five"]`)
3232
- `stateOn` (`?string='glyphicon-star'`) - selected icon class
3333
- `stateOff` (`?string='glyphicon-star-empty'`) - unselected icon class
34-
- `ratingStates` (`?Array<{stateOn:string, stateOff:string}>`) - array of custom icons classes
34+
- `ratingStates` (`?{stateOn:string, stateOff:string}[]`) - array of custom icons classes
3535

3636
### Rating events
3737
- `onHover` - fired when icon selected, `$event:number` equals to selected rating

components/typeahead/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { TYPEAHEAD_DIRECTIVES } from 'ng2-bootstrap/components/typeahead';
1414
export class TypeaheadDirective implements OnInit {
1515
@Output() public typeaheadLoading:EventEmitter<boolean>;
1616
@Output() public typeaheadNoResults:EventEmitter<boolean>;
17-
@Output() public typeaheadOnSelect:EventEmitter<{item: any}>;
17+
@Output() public typeaheadOnSelect:EventEmitter&lt;{item: any}&gt;;
1818

1919
@Input() public typeahead:any;
2020
@Input() public typeaheadMinLength:number;
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
.prettyprint {
2+
white-space: pre-wrap;
3+
background: #F5F6F7;
4+
font-family: Monaco,"Lucida Console",monospace;
5+
color: #5C707A;
6+
width: auto;
7+
overflow: auto;
8+
position: relative;
9+
padding: 0;
10+
font-size: 13px;
11+
line-height: 24px;
12+
margin-bottom: 24px;
13+
border-radius: 4px;
14+
padding: 16px 32px
15+
}
16+
17+
.prettyprint.linenums,.prettyprint[class^="linenums:"],.prettyprint[class*=" linenums:"] {
18+
padding: 0
19+
}
20+
21+
.prettyprint.is-showcase {
22+
border: 4px solid #0273D4
23+
}
24+
25+
.prettyprint code {
26+
background: none;
27+
font-size: 13px;
28+
padding: 0
29+
}
30+
31+
.prettyprint ol {
32+
background: #F5F6F7;
33+
padding: 16px 32px 16px 56px;
34+
margin: 0;
35+
overflow: auto;
36+
font-size: 13px
37+
}
38+
39+
.prettyprint ol li {
40+
color: #7a8b94;
41+
background: none;
42+
margin-bottom: 5px;
43+
line-height: normal;
44+
list-style-type: decimal;
45+
font-size: 12px
46+
}
47+
48+
.prettyprint ol li:last-child {
49+
margin-bottom: 0
50+
}
51+
52+
.prettyprint ol li code {
53+
background: none;
54+
font-size: 13px
55+
}
56+
57+
.prettyprint .pnk,.prettyprint .blk {
58+
border-radius: 4px;
59+
padding: 2px 4px
60+
}
61+
62+
.prettyprint .pnk {
63+
background: #CFD8DC;
64+
color: #5C707A
65+
}
66+
67+
.prettyprint .blk {
68+
background: #E0E0E0
69+
}
70+
71+
.prettyprint .otl {
72+
outline: 1px solid rgba(169,169,169,0.56)
73+
}
74+
75+
.prettyprint .kwd {
76+
color: #D43669
77+
}
78+
79+
.prettyprint .typ,.prettyprint .tag {
80+
color: #D43669
81+
}
82+
83+
.prettyprint .str,.prettyprint .atv {
84+
color: #647f11
85+
}
86+
87+
.prettyprint .atn {
88+
/*color: #647f11*/
89+
color: #31708f
90+
}
91+
92+
.prettyprint .com {
93+
color: #647f11
94+
}
95+
96+
.prettyprint .lit {
97+
color: #647f11
98+
}
99+
100+
.prettyprint .pun {
101+
color: #7a8b94
102+
}
103+
104+
.prettyprint .pln {
105+
color: #5C707A
106+
/*color: #8a6d3b*/
107+
}
108+
109+
.prettyprint .dec {
110+
color: #647f11
111+
}
112+
113+
@media print {
114+
.prettyprint {
115+
background: #F5F6F7;
116+
border: none;
117+
box-shadow: none
118+
}
119+
120+
.prettyprint ol {
121+
background: #F5F6F7
122+
}
123+
124+
.prettyprint .kwd {
125+
color: #D43669
126+
}
127+
128+
.prettyprint .typ,.prettyprint .tag {
129+
color: #D43669
130+
}
131+
132+
.prettyprint .str,.prettyprint .atv {
133+
color: #647f11
134+
}
135+
136+
.prettyprint .atn {
137+
/*color: #647f11*/
138+
color: #31708f
139+
}
140+
141+
.prettyprint .com {
142+
color: #647f11
143+
}
144+
145+
.prettyprint .lit {
146+
color: #647f11
147+
}
148+
149+
.prettyprint .pun {
150+
color: #7a8b94
151+
}
152+
153+
.prettyprint .pln {
154+
color: #5C707A
155+
}
156+
157+
.prettyprint .dec {
158+
color: #647f11
159+
}
160+
}
161+
162+
h1 .prettyprint,h2 .prettyprint,h3 .prettyprint,h4 .prettyprint {
163+
background: none;
164+
font-family: Monaco,"Lucida Console",monospace;
165+
color: #253238;
166+
overflow: hidden;
167+
position: relative;
168+
font-size: 15px;
169+
font-weight: 600;
170+
line-height: 24px;
171+
margin: 0;
172+
border: none;
173+
box-shadow: none;
174+
padding: 0
175+
}
176+
177+
h1 .prettyprint code,h2 .prettyprint code,h3 .prettyprint code,h4 .prettyprint code {
178+
background: none;
179+
font-size: 15px;
180+
padding: 0
181+
}
182+
183+
h1 .prettyprint .kwd,h2 .prettyprint .kwd,h3 .prettyprint .kwd,h4 .prettyprint .kwd {
184+
color: #253238
185+
}
186+
187+
h1 .prettyprint .typ,h1 .prettyprint .tag,h2 .prettyprint .typ,h2 .prettyprint .tag,h3 .prettyprint .typ,h3 .prettyprint .tag,h4 .prettyprint .typ,h4 .prettyprint .tag {
188+
color: #B52E31
189+
}
190+
191+
h1 .prettyprint .str,h1 .prettyprint .atv,h2 .prettyprint .str,h2 .prettyprint .atv,h3 .prettyprint .str,h3 .prettyprint .atv,h4 .prettyprint .str,h4 .prettyprint .atv {
192+
color: #9d8d00
193+
}
194+
195+
h1 .prettyprint .atn,h2 .prettyprint .atn,h3 .prettyprint .atn,h4 .prettyprint .atn {
196+
color: #71a436
197+
}
198+
199+
h1 .prettyprint .com,h2 .prettyprint .com,h3 .prettyprint .com,h4 .prettyprint .com {
200+
color: #AFBEC5
201+
}
202+
203+
h1 .prettyprint .lit,h2 .prettyprint .lit,h3 .prettyprint .lit,h4 .prettyprint .lit {
204+
color: #9d8d00
205+
}
206+
207+
h1 .prettyprint .pun,h2 .prettyprint .pun,h3 .prettyprint .pun,h4 .prettyprint .pun {
208+
color: #000
209+
}
210+
211+
h1 .prettyprint .pln,h2 .prettyprint .pln,h3 .prettyprint .pln,h4 .prettyprint .pln {
212+
color: #000
213+
}
214+
215+
h1 .prettyprint .dec,h2 .prettyprint .dec,h3 .prettyprint .dec,h4 .prettyprint .dec {
216+
color: #8762c6
217+
}

0 commit comments

Comments
 (0)