Skip to content

Commit

Permalink
feat(demo): new build process with ng2-webpack-config
Browse files Browse the repository at this point in the history
  • Loading branch information
valorkin authored and Oleksandr Telnov committed Jun 24, 2016
1 parent 0c9bb0d commit 5c8fcf1
Show file tree
Hide file tree
Showing 42 changed files with 562 additions and 532 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ npm-debug.log
/dist
/coverage
/ts
/doc

# ignore incline compiling
/demo/**/*.js
Expand Down
30 changes: 30 additions & 0 deletions .ng2-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* eslint no-var:0 */
'use strict';
var pkg = require('./package.json');

module.exports = {
// metadata
title: pkg.description,
baseUrl: '/',
// root folder name
src: 'demo',
dist: 'demo-build',
htmlIndexes: ['index.html', 'index-bs4.html'],
// karma bundle src
spec: './spec-bundle.js',
// webpack entry
entry: {
polyfills: './demo/polyfills.ts',
vendor: './demo/vendor.ts',
main: './demo/index.ts'
},
commonChunks: {
name: ['polyfills', 'vendor'].reverse()
},
// webpack alias
alias: {},
copy: [
{from: 'demo/favicon.ico', to: 'favicon.ico'},
{from: 'demo/assets', to: 'assets'}
]
};
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ test.bundle.js
coverage

# demo build
doc
demo
demo-build
webpack.config.js
Expand Down
2 changes: 1 addition & 1 deletion components/rating/rating.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class RatingComponent implements ControlValueAccessor, OnInit {
@Input() public stateOff:string;
@Input() public readonly:boolean;
@Input() public titles:Array<string>;
@Input() public ratingStates:Array<{stateOn:string, stateOff:string}>;
@Input() public ratingStates:{stateOn:string, stateOff:string}[];

@Output() public onHover:EventEmitter<number> = new EventEmitter(false);
@Output() public onLeave:EventEmitter<number> = new EventEmitter(false);
Expand Down
4 changes: 2 additions & 2 deletions components/rating/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class RatingComponent implements ControlValueAccessor, OnInit {
@Input() private stateOff:string;
@Input() private readonly:boolean;
@Input() private titles:Array<string>;
@Input() private ratingStates:Array<{stateOn:string, stateOff:string}>;
@Input() private ratingStates:{stateOn:string, stateOff:string}[];

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

### Rating events
- `onHover` - fired when icon selected, `$event:number` equals to selected rating
Expand Down
2 changes: 1 addition & 1 deletion components/typeahead/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { TYPEAHEAD_DIRECTIVES } from 'ng2-bootstrap/components/typeahead';
export class TypeaheadDirective implements OnInit {
@Output() public typeaheadLoading:EventEmitter<boolean>;
@Output() public typeaheadNoResults:EventEmitter<boolean>;
@Output() public typeaheadOnSelect:EventEmitter<{item: any}>;
@Output() public typeaheadOnSelect:EventEmitter&lt;{item: any}&gt;;

@Input() public typeahead:any;
@Input() public typeaheadMinLength:number;
Expand Down
217 changes: 217 additions & 0 deletions demo/assets/css/prettify-angulario.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
.prettyprint {
white-space: pre-wrap;
background: #F5F6F7;
font-family: Monaco,"Lucida Console",monospace;
color: #5C707A;
width: auto;
overflow: auto;
position: relative;
padding: 0;
font-size: 13px;
line-height: 24px;
margin-bottom: 24px;
border-radius: 4px;
padding: 16px 32px
}

.prettyprint.linenums,.prettyprint[class^="linenums:"],.prettyprint[class*=" linenums:"] {
padding: 0
}

.prettyprint.is-showcase {
border: 4px solid #0273D4
}

.prettyprint code {
background: none;
font-size: 13px;
padding: 0
}

.prettyprint ol {
background: #F5F6F7;
padding: 16px 32px 16px 56px;
margin: 0;
overflow: auto;
font-size: 13px
}

.prettyprint ol li {
color: #7a8b94;
background: none;
margin-bottom: 5px;
line-height: normal;
list-style-type: decimal;
font-size: 12px
}

.prettyprint ol li:last-child {
margin-bottom: 0
}

.prettyprint ol li code {
background: none;
font-size: 13px
}

.prettyprint .pnk,.prettyprint .blk {
border-radius: 4px;
padding: 2px 4px
}

.prettyprint .pnk {
background: #CFD8DC;
color: #5C707A
}

.prettyprint .blk {
background: #E0E0E0
}

.prettyprint .otl {
outline: 1px solid rgba(169,169,169,0.56)
}

.prettyprint .kwd {
color: #D43669
}

.prettyprint .typ,.prettyprint .tag {
color: #D43669
}

.prettyprint .str,.prettyprint .atv {
color: #647f11
}

.prettyprint .atn {
/*color: #647f11*/
color: #31708f
}

.prettyprint .com {
color: #647f11
}

.prettyprint .lit {
color: #647f11
}

.prettyprint .pun {
color: #7a8b94
}

.prettyprint .pln {
color: #5C707A
/*color: #8a6d3b*/
}

.prettyprint .dec {
color: #647f11
}

@media print {
.prettyprint {
background: #F5F6F7;
border: none;
box-shadow: none
}

.prettyprint ol {
background: #F5F6F7
}

.prettyprint .kwd {
color: #D43669
}

.prettyprint .typ,.prettyprint .tag {
color: #D43669
}

.prettyprint .str,.prettyprint .atv {
color: #647f11
}

.prettyprint .atn {
/*color: #647f11*/
color: #31708f
}

.prettyprint .com {
color: #647f11
}

.prettyprint .lit {
color: #647f11
}

.prettyprint .pun {
color: #7a8b94
}

.prettyprint .pln {
color: #5C707A
}

.prettyprint .dec {
color: #647f11
}
}

h1 .prettyprint,h2 .prettyprint,h3 .prettyprint,h4 .prettyprint {
background: none;
font-family: Monaco,"Lucida Console",monospace;
color: #253238;
overflow: hidden;
position: relative;
font-size: 15px;
font-weight: 600;
line-height: 24px;
margin: 0;
border: none;
box-shadow: none;
padding: 0
}

h1 .prettyprint code,h2 .prettyprint code,h3 .prettyprint code,h4 .prettyprint code {
background: none;
font-size: 15px;
padding: 0
}

h1 .prettyprint .kwd,h2 .prettyprint .kwd,h3 .prettyprint .kwd,h4 .prettyprint .kwd {
color: #253238
}

h1 .prettyprint .typ,h1 .prettyprint .tag,h2 .prettyprint .typ,h2 .prettyprint .tag,h3 .prettyprint .typ,h3 .prettyprint .tag,h4 .prettyprint .typ,h4 .prettyprint .tag {
color: #B52E31
}

h1 .prettyprint .str,h1 .prettyprint .atv,h2 .prettyprint .str,h2 .prettyprint .atv,h3 .prettyprint .str,h3 .prettyprint .atv,h4 .prettyprint .str,h4 .prettyprint .atv {
color: #9d8d00
}

h1 .prettyprint .atn,h2 .prettyprint .atn,h3 .prettyprint .atn,h4 .prettyprint .atn {
color: #71a436
}

h1 .prettyprint .com,h2 .prettyprint .com,h3 .prettyprint .com,h4 .prettyprint .com {
color: #AFBEC5
}

h1 .prettyprint .lit,h2 .prettyprint .lit,h3 .prettyprint .lit,h4 .prettyprint .lit {
color: #9d8d00
}

h1 .prettyprint .pun,h2 .prettyprint .pun,h3 .prettyprint .pun,h4 .prettyprint .pun {
color: #000
}

h1 .prettyprint .pln,h2 .prettyprint .pln,h3 .prettyprint .pln,h4 .prettyprint .pln {
color: #000
}

h1 .prettyprint .dec,h2 .prettyprint .dec,h3 .prettyprint .dec,h4 .prettyprint .dec {
color: #8762c6
}
Loading

0 comments on commit 5c8fcf1

Please sign in to comment.