diff --git a/README.md b/README.md index ce875e1..b1c2566 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ The `NgGrid` and `NgGridItem` can be configured by binding directly to the direc ```html
-
+
{{box.title}}

{{box.text}}

diff --git a/gulpfile.js b/gulpfile.js index bf846c1..5699717 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -28,23 +28,11 @@ var PATHS = { test: 'test/*.ts', typings: 'src/*.d.ts' }, - libs: [ - 'bower_components/bootstrap/dist/css/bootstrap.min.css', - 'bower_components/bootstrap/dist/css/bootstrap-theme.min.css', - 'node_modules/angular2/bundles/angular2.js', - 'node_modules/angular2/bundles/angular2-polyfills.min.js', - 'node_modules/systemjs/dist/system.js', - 'node_modules/systemjs/dist/system-polyfills.js', - 'node_modules/es6-shim/es6-shim.min.js', - 'node_modules/reflect-metadata/Reflect.js', - 'node_modules/rxjs/bundles/Rx.min.js' - ], - rx: 'node_modules/rxjs/**/*.js', typings: [ - 'node_modules/angular2/typings/**/*.d.ts', + 'typings/browser.d.ts', ], testTypings: [ - 'node_modules/angular2/typings/**/*.d.ts', + 'typings/browser.d.ts', 'dist/*.d.ts' ], }; @@ -107,15 +95,18 @@ gulp.task('css', function () { return gulp.src(PATHS.src.css).pipe(gulp.dest('dist')); }); -gulp.task('rx', function () { - return gulp.src(PATHS.rx, {base: 'node_modules/'}).pipe(gulp.dest('dist/')); +gulp.task('libs', function () { + return merge([ + gulp.src('node_modules/').pipe(symlink('dist/node_modules')), + gulp.src('bower_components/').pipe(symlink('dist/bower_components')) + ]); }); -gulp.task('libs', ['rx'], function () { - return gulp.src(PATHS.libs).pipe(gulp.dest('dist/lib')); +gulp.task('clean', function(done) { + return del(['dist'], done); }); -gulp.task('build', function() { +gulp.task('build', ['clean'], function() { return gulp.start('libs', 'html', 'css', 'ts'); }); diff --git a/package.json b/package.json index 792714f..4cedeff 100644 --- a/package.json +++ b/package.json @@ -39,10 +39,12 @@ "dist/NgGrid*" ], "peerDependencies": { - "angular2": "^2.0.0-beta.16" + "@angular/core": "^2.0.0-rc.0" }, "devDependencies": { - "angular2": "^2.0.0-beta.16", + "@angular/common": "^2.0.0-rc.0", + "@angular/core": "^2.0.0-rc.0", + "@angular/platform-browser-dynamic": "^2.0.0-rc.0", "del": "^1.2.1", "es6-promise": "^3.0.2", "es6-shim": "^0.35.0", @@ -65,7 +67,7 @@ "rxjs": "^5.0.0-beta.6", "systemjs": "^0.19.4", "typescript": "^1.6.2", - "zone.js": "^0.6.6" + "zone.js": "^0.6.12" }, "dependencies": {} } diff --git a/src/NgGrid.d.ts b/src/NgGrid.d.ts index 821cbc7..789be73 100644 --- a/src/NgGrid.d.ts +++ b/src/NgGrid.d.ts @@ -1,4 +1,4 @@ -import { ElementRef, Renderer, EventEmitter, DynamicComponentLoader, KeyValueDiffers, OnInit, OnDestroy, DoCheck, ViewContainerRef } from 'angular2/core'; +import { ElementRef, Renderer, EventEmitter, DynamicComponentLoader, KeyValueDiffers, OnInit, OnDestroy, DoCheck, ViewContainerRef } from '@angular/core'; export interface NgGridConfig { margins?: number[]; draggable?: boolean; diff --git a/src/NgGrid.ts b/src/NgGrid.ts index 78a1a7e..1c2d180 100644 --- a/src/NgGrid.ts +++ b/src/NgGrid.ts @@ -1,4 +1,4 @@ -import { Component, Directive, ElementRef, Renderer, EventEmitter, DynamicComponentLoader, Host, ViewEncapsulation, Type, ComponentRef, KeyValueDiffer, KeyValueDiffers, OnInit, OnDestroy, DoCheck, ViewContainerRef, Output } from 'angular2/core'; +import { Component, Directive, ElementRef, Renderer, EventEmitter, DynamicComponentLoader, Host, ViewEncapsulation, Type, ComponentRef, KeyValueDiffer, KeyValueDiffers, OnInit, OnDestroy, DoCheck, ViewContainerRef, Output } from '@angular/core'; // Default config export interface NgGridConfig { @@ -82,7 +82,7 @@ export class NgGrid implements OnInit, DoCheck, OnDestroy { private _setHeight: number = 250; private _posOffset: { left: number, top: number } = null; private _adding: boolean = false; - private _placeholderRef: ComponentRef = null; + private _placeholderRef: ComponentRef = null; private _fixToGrid: boolean = false; private _autoResize: boolean = false; private _differ: KeyValueDiffer; diff --git a/src/app.ts b/src/app.ts index 99152de..3f8f62f 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,6 +1,6 @@ -import { Component, ViewEncapsulation, enableProdMode } from 'angular2/core'; -import { CORE_DIRECTIVES, FORM_DIRECTIVES } from 'angular2/common'; -import { bootstrap } from 'angular2/platform/browser'; +import { Component, ViewEncapsulation, enableProdMode } from '@angular/core'; +import { CORE_DIRECTIVES, FORM_DIRECTIVES } from '@angular/common'; +import { bootstrap } from '@angular/platform-browser-dynamic'; import { NgGrid, NgGridConfig, NgGridItem, NgGridItemConfig, NgGridItemEvent } from "./NgGrid"; // Annotation section diff --git a/src/index.html b/src/index.html index d814027..a04412b 100644 --- a/src/index.html +++ b/src/index.html @@ -2,12 +2,11 @@ Angular 2 Grid Demo - - - - - - + + + + + @@ -16,9 +15,17 @@ System.config({ defaultJSExtensions: true, packages: { - 'angular2': { - defaultExtension: false - } + '@angular/common': { main: 'index.js', defaultExtension: 'js' }, + '@angular/core': { main: 'index.js', defaultExtension: 'js' }, + '@angular/platform-browser-dynamic': { main: 'index.js', defaultExtension: 'js' }, + '@angular/platform-browser': { main: 'index.js', defaultExtension: 'js' }, + '@angular/compiler': { main: 'index.js', defaultExtension: 'js' }, + 'rxjs': { defaultExtension: 'js' }, + 'app': { defaultExtension: 'js' } + }, + map: { + '@angular': 'node_modules/@angular', + 'rxjs': 'node_modules/rxjs' } }); System.import('app'); diff --git a/tsconfig.json b/tsconfig.json index 93a7bae..d8f4c3b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,8 @@ }, "exclude": [ "bower", - "node_modules" + "node_modules", + "typings/main", + "typings/main.d.ts" ] } \ No newline at end of file diff --git a/tsd.json b/tsd.json deleted file mode 100644 index a8480c3..0000000 --- a/tsd.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "v4", - "repo": "borisyankov/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "jasmine/jasmine.d.ts": { - "commit": "b937e64fc9245d299fa4ba26c6eddbeaed42a920" - } - } -} diff --git a/typings.json b/typings.json new file mode 100644 index 0000000..9d5c20b --- /dev/null +++ b/typings.json @@ -0,0 +1,6 @@ +{ + "ambientDependencies": { + "es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654", + "jasmine": "registry:dt/jasmine#2.2.0+20160412134438" + } +}