Skip to content

Commit

Permalink
feat(package): upgrade to angular 2.0.0-rc.1 (#176)
Browse files Browse the repository at this point in the history
* Upgrade to angular 2.0.0-rc.1

* Add a simple .travis.yml

closes #180

* Upgrade to ng2-bootstrap 1.0.16

* Install typings on prepublish

* (chore) Fix rxjs dependency, moved it to dev dep

* (chore) Upgrade to node 6. Keep mandatory deps.
  • Loading branch information
ciriarte authored and valorkin committed May 7, 2016
1 parent 32219be commit 13c5c35
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 39 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: node_js
node_js:
- "6"

script:
- npm test
- npm run deploy

addons:
firefox: "42.0"
apt:
sources:
- ubuntu-toolchain-r-test
# required by node-gyp to build some packages
packages:
- g++-4.8
2 changes: 1 addition & 1 deletion components/file-upload/file-drop.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Directive, EventEmitter, ElementRef } from 'angular2/core';
import { Directive, EventEmitter, ElementRef } from '@angular/core';

import { FileUploader } from './file-uploader';

Expand Down
2 changes: 1 addition & 1 deletion components/file-upload/file-select.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Directive, ElementRef } from 'angular2/core';
import { Directive, ElementRef } from '@angular/core';

import {FileUploader} from './file-uploader';

Expand Down
4 changes: 2 additions & 2 deletions demo/components/file-upload-section.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference path="../../tsd.d.ts" />

import {Component, View} from 'angular2/core';
import {CORE_DIRECTIVES} from 'angular2/common';
import {Component} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';

import {TAB_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap';
import {SimpleDemo} from './file-upload/simple-demo';
Expand Down
2 changes: 1 addition & 1 deletion demo/components/file-upload/simple-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h3>Upload queue</h3>
</tr>
</thead>
<tbody>
<tr *ngFor="#item of uploader.queue">
<tr *ngFor="let item of uploader.queue">
<td><strong>{{ item?.file?.name }}</strong></td>
<td *ngIf="uploader.isHTML5" nowrap>{{ item?.file?.size/1024/1024 | number:'.2' }} MB</td>
<td *ngIf="uploader.isHTML5">
Expand Down
4 changes: 2 additions & 2 deletions demo/components/file-upload/simple-demo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference path="../../../tsd.d.ts" />

import {Component} from 'angular2/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass, NgStyle} from 'angular2/common';
import {Component} from '@angular/core';
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass, NgStyle} from '@angular/common';
import {FILE_UPLOAD_DIRECTIVES, FileUploader} from '../../../ng2-file-upload';

// webpack html imports
Expand Down
10 changes: 4 additions & 6 deletions demo/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
/// <reference path="../tsd.d.ts" />
import {bootstrap} from 'angular2/platform/browser';
import {Component, View} from 'angular2/core';
import {NgClass} from 'angular2/common';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {Component} from '@angular/core';
import {NgClass} from '@angular/common';

import {FileUploadSection} from './components/file-upload-section';

let gettingStarted = require('./getting-started.md');

@Component({
selector: 'app'
})
@View({
selector: 'app',
template: `
<main class="bd-pageheader">
<div class="container">
Expand Down
43 changes: 27 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "angular2 file upload directives",
"scripts": {
"deploy": "NODE_ENV=production webpack -p --progress --color --optimize-minimize --optimize-dedupe --optimize-occurence-order",
"prepublish": "gulp clean && tsc",
"prepublish": "gulp clean && ./node_modules/.bin/typings install && tsc",
"server": "webpack-dev-server --hot --inline --colors --display-error-details --display-cached",
"start": "npm run server",
"test": "gulp lint"
Expand All @@ -27,40 +27,51 @@
"url": "https://github.com/valor-software/ng2-file-upload/issues"
},
"homepage": "https://github.com/valor-software/ng2-file-upload#readme",
"dependencies": {},
"dependencies": {
},
"peerDependencies": {
"@angular/common": "^2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1"
},
"devDependencies": {
"angular2": "2.0.0-beta.0",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"zone.js": "0.6.10",
"es6-shim": "0.33.13",
"@angular/common": "^2.0.0-rc.1",
"@angular/compiler": "^2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1",
"@angular/platform-browser": "^2.0.0-rc.1",
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
"bootstrap": "3.3.6",
"clean-webpack-plugin": "0.1.8",
"clean-webpack-plugin": "0.1.9",
"compression-webpack-plugin": "0.3.1",
"es6-promise": "^3.1.2",
"es6-shim": "^0.35.0",
"eslint": "1.10.3",
"exports-loader": "0.6.3",
"file-loader": "0.8.5",
"gulp": "3.9.1",
"gulp-clean": "0.3.2",
"gulp-eslint": "1.1.1",
"gulp-size": "2.1.0",
"gulp-tsc": "1.1.4",
"gulp-tslint": "4.3.5",
"gulp-tsc": "1.1.5",
"gulp-tslint": "5.0.0",
"html-loader": "0.4.3",
"markdown-loader": "0.1.7",
"marked": "0.3.5",
"moment": "2.11.2",
"ng2-bootstrap": "1.0.11",
"moment": "2.13.0",
"ng2-bootstrap": "1.0.16",
"pre-commit": "1.1.2",
"prismjs": "valorkin/prism",
"prismjs-loader": "0.0.2",
"raw-loader": "0.5.1",
"reflect-metadata": "0.1.2",
"require-dir": "0.3.0",
"rxjs": "5.0.0-beta.6",
"ts-loader": "0.8.2",
"tslint": "3.7.1",
"typescript": "1.8.9",
"webpack": "1.12.15",
"webpack-dev-server": "1.14.0"
"tslint": "3.9.0",
"typescript": "1.8.10",
"typings": "^0.8.1",
"webpack": "1.13.0",
"webpack-dev-server": "1.14.1",
"zone.js": "^0.6.12"
},
"contributors": [
{
Expand Down
15 changes: 8 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
{
"version": "1.7.5",
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true,
"moduleResolution": "node",
"sourceMap": false,
"declaration": true,
"removeComments": true,
"removeComments": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": true,
"listFiles": false,
"noLib": false,
"noImplicitAny": true
"noLib": false
},
"exclude": [
"node_modules"
],
"files": [
"ng2-file-upload.ts"
"./typings/browser.d.ts",
"./ng2-file-upload.ts"
]
}
}
9 changes: 9 additions & 0 deletions typings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"dependencies": {
"webpack": "registry:npm/webpack#1.12.9+20160219013405"
},
"devDependencies": {},
"ambientDependencies": {
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654"
}
}
8 changes: 5 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ var config = {
entry: {
angular2: [
// Angular 2 Deps
'zone.js/dist/zone-microtask',
'es6-shim',
'es6-promise',
'zone.js',
'reflect-metadata',
'angular2/common',
'angular2/core'
'@angular/common',
'@angular/core'
],
'angular2-file-upload': ['ng2-file-upload'],
'angular2-file-upload-demo': 'demo'
Expand Down

0 comments on commit 13c5c35

Please sign in to comment.