-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(package): update to angular 2.0.0 (#412)
* update angular to rc7, update rest of dependencies, use ng2-webpack-config, create modules and update app to rc7 * add custom typings * update to 2.0.0, remove typings * return typescript v * fix select styles * sanitize html (colorbox) add ngc compiler
- Loading branch information
Showing
34 changed files
with
672 additions
and
686 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
'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'], | ||
// 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'} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ webpack.config.js | |
/components/**/*.ts | ||
!/components/**/*.d.ts | ||
|
||
factories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { SelectComponent } from './select/select'; | ||
import { HighlightPipe } from './select/select-pipes'; | ||
import { OffClickDirective } from './select/off-click'; | ||
|
||
@NgModule({ | ||
imports: [CommonModule], | ||
declarations: [SelectComponent, HighlightPipe, OffClickDirective], | ||
exports: [SelectComponent, HighlightPipe, OffClickDirective] | ||
}) | ||
export class SelectModule { | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,34 @@ | ||
import { it, expect, describe, inject, beforeEachProviders } from '@angular/core/testing'; | ||
import { ComponentFixture } from '@angular/compiler/testing'; | ||
import { HighlightPipe } from './select-pipes'; | ||
|
||
describe('Component: HighlightPipe', () => { | ||
beforeEachProviders(() => [ | ||
HighlightPipe | ||
]); | ||
it('should be fine', inject([HighlightPipe], (fixture:ComponentFixture<HighlightPipe>) => { | ||
import { Component } from '@angular/core'; | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { SelectModule } from '../../ng2-select'; | ||
|
||
const html = ``; | ||
|
||
describe('Component: ng2-select', () => { | ||
let fixture:ComponentFixture<any>; | ||
let context:TestSelectComponent; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [TestSelectComponent], | ||
imports: [SelectModule] | ||
}); | ||
TestBed.overrideComponent(TestSelectComponent, {set: {template: html}}); | ||
fixture = TestBed.createComponent(TestSelectComponent); | ||
context = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('fixture should not be null', () => { | ||
expect(fixture).not.toBeNull(); | ||
})); | ||
}); | ||
}); | ||
|
||
@Component({ | ||
selector: 'select-test', | ||
template: '<ng-select></ng-select>' | ||
}) | ||
|
||
class TestSelectComponent { | ||
} |
Oops, something went wrong.