Updated: angular2 0.40.0 integration
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
Component, View, OnInit, OnDestroy, OnChanges,
|
Component, View, OnInit, OnDestroy, OnChanges,
|
||||||
Directive, LifecycleEvent,
|
Directive, EventEmitter, ElementRef, Renderer,
|
||||||
EventEmitter, ElementRef, Renderer,
|
|
||||||
CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass
|
CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass
|
||||||
} from 'angular2/angular2';
|
} from 'angular2/angular2';
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
Component, View, OnInit, OnDestroy, OnChanges,
|
Component, View, OnInit, OnDestroy, OnChanges,
|
||||||
Directive, LifecycleEvent,
|
Directive, EventEmitter, ElementRef, Renderer,
|
||||||
EventEmitter, ElementRef, Renderer,
|
|
||||||
CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass
|
CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass
|
||||||
} from 'angular2/angular2';
|
} from 'angular2/angular2';
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/// <reference path="../tsd.d.ts" />
|
||||||
|
|
||||||
declare module 'ng2-file-upload' {
|
declare module 'ng2-file-upload' {
|
||||||
export * from 'index';
|
export = require('index');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/// <reference path="../../tsd.d.ts" />
|
/// <reference path="../../tsd.d.ts" />
|
||||||
|
|
||||||
import {Component, View, CORE_DIRECTIVES, NgNonBindable} from 'angular2/angular2';
|
import {Component, View, CORE_DIRECTIVES} from 'angular2/angular2';
|
||||||
|
|
||||||
import {tabs} from 'ng2-bootstrap';
|
import {tabs} from 'ng2-bootstrap';
|
||||||
import {SimpleDemo} from './file-upload/simple-demo';
|
import {SimpleDemo} from './file-upload/simple-demo';
|
||||||
@@ -65,7 +65,7 @@ tabDesc.forEach(desc => {
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
`,
|
`,
|
||||||
directives: [SimpleDemo, tabs, CORE_DIRECTIVES, NgNonBindable]
|
directives: [SimpleDemo, tabs, CORE_DIRECTIVES]
|
||||||
})
|
})
|
||||||
export class FileUploadSection {
|
export class FileUploadSection {
|
||||||
private currentHeading:string = 'Simple';
|
private currentHeading:string = 'Simple';
|
||||||
|
|||||||
23
package.json
23
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ng2-file-upload",
|
"name": "ng2-file-upload",
|
||||||
"version": "0.0.1",
|
"version": "0.40.0",
|
||||||
"description": "angular2 file upload directives",
|
"description": "angular2 file upload directives",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"deploy": "NODE_ENV=production webpack -p --progress --color --optimize-minimize --optimize-dedupe --optimize-occurence-order",
|
"deploy": "NODE_ENV=production webpack -p --progress --color --optimize-minimize --optimize-dedupe --optimize-occurence-order",
|
||||||
@@ -40,14 +40,11 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/valor-software/ng2-file-upload#readme",
|
"homepage": "https://github.com/valor-software/ng2-file-upload#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-alpha.37",
|
"angular2": "^2.0.0-alpha.40",
|
||||||
"es6-promise": "3.0.2",
|
"ng2-bootstrap": "^0.40.0",
|
||||||
"moment": "^2.10.6",
|
"reflect-metadata": "0.1.2",
|
||||||
"ng2-bootstrap": "^0.37.0",
|
"ts-loader": "0.5.6",
|
||||||
"reflect-metadata": "0.1.1",
|
"zone.js": "0.5.8"
|
||||||
"rtts_assert": "2.0.0-alpha.37",
|
|
||||||
"traceur-runtime": "0.0.59",
|
|
||||||
"zone.js": "0.5.4"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bootstrap": "^3.3.5",
|
"bootstrap": "^3.3.5",
|
||||||
@@ -65,14 +62,14 @@
|
|||||||
"html-loader": "^0.3.0",
|
"html-loader": "^0.3.0",
|
||||||
"markdown-loader": "^0.1.7",
|
"markdown-loader": "^0.1.7",
|
||||||
"marked": "^0.3.5",
|
"marked": "^0.3.5",
|
||||||
|
"moment": "^2.10.6",
|
||||||
"pre-commit": "^1.1.1",
|
"pre-commit": "^1.1.1",
|
||||||
"prismjs": "valorkin/prism",
|
"prismjs": "valorkin/prism",
|
||||||
"prismjs-loader": "0.0.2",
|
"prismjs-loader": "0.0.2",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"require-dir": "^0.3.0",
|
"require-dir": "^0.3.0",
|
||||||
"typescript": "^1.5.3",
|
"typescript": "^1.6.2",
|
||||||
"typescript-simple-loader": "^0.3.4",
|
"webpack": "^1.12.2",
|
||||||
"webpack": "^1.11.0",
|
"webpack-dev-server": "^1.12.0"
|
||||||
"webpack-dev-server": "^1.10.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "1.5.3",
|
"version": "1.6.2",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
@@ -15,21 +15,16 @@
|
|||||||
"noImplicitAny": false
|
"noImplicitAny": false
|
||||||
},
|
},
|
||||||
"filesGlob": [
|
"filesGlob": [
|
||||||
"./**/*.ts",
|
|
||||||
"!./node_modules/**/*.ts"
|
"!./node_modules/**/*.ts"
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
|
"./tsd.d.ts",
|
||||||
"./components/file-upload/file-select.ts",
|
"./components/file-upload/file-select.ts",
|
||||||
"./components/file-upload/file-item.ts",
|
"./components/file-upload/file-item.ts",
|
||||||
"./components/file-upload/file-like-object.ts",
|
"./components/file-upload/file-like-object.ts",
|
||||||
"./components/file-upload/file-drop.ts",
|
"./components/file-upload/file-drop.ts",
|
||||||
"./components/file-upload/file-uploader.ts",
|
"./components/file-upload/file-uploader.ts",
|
||||||
"./components/index.ts",
|
"./components/index.ts",
|
||||||
"./components/module.ts",
|
"./components/module.ts"
|
||||||
"./demo/components/file-upload-section.ts",
|
|
||||||
"./demo/components/file-upload/simple-demo.ts",
|
|
||||||
"./demo/index.ts",
|
|
||||||
"./tsd.d.ts",
|
|
||||||
"./typings/tsd.d.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,10 +28,16 @@ var absDest = path.join(__dirname, dest);
|
|||||||
var config = {
|
var config = {
|
||||||
// isProduction ? 'source-map' : 'evale',
|
// isProduction ? 'source-map' : 'evale',
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
|
|
||||||
debug: true,
|
debug: true,
|
||||||
cache: false,
|
cache: true,
|
||||||
|
|
||||||
|
verbose: true,
|
||||||
|
displayErrorDetails: true,
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
|
stats: {
|
||||||
|
colors: true,
|
||||||
|
reasons: true
|
||||||
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
root: __dirname,
|
root: __dirname,
|
||||||
@@ -42,11 +48,10 @@ var config = {
|
|||||||
entry: {
|
entry: {
|
||||||
angular2: [
|
angular2: [
|
||||||
// Angular 2 Deps
|
// Angular 2 Deps
|
||||||
'traceur-runtime',
|
|
||||||
'zone.js',
|
'zone.js',
|
||||||
'reflect-metadata',
|
'reflect-metadata',
|
||||||
'rtts_assert/rtts_assert',
|
'angular2/angular2',
|
||||||
'angular2/angular2'
|
'angular2/core'
|
||||||
],
|
],
|
||||||
'angular2-file-upload': ['components'],
|
'angular2-file-upload': ['components'],
|
||||||
'angular2-file-upload-demo': 'demo'
|
'angular2-file-upload-demo': 'demo'
|
||||||
@@ -67,15 +72,10 @@ var config = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
'*/api/*': 'http://localhost:3000/'
|
'*/api/*': 'http://localhost:3000/'
|
||||||
},
|
},
|
||||||
|
|
||||||
/*noInfo: false,
|
|
||||||
hot: true,
|
|
||||||
inline: true,
|
|
||||||
devtool: 'eval',*/
|
|
||||||
|
|
||||||
contentBase: src,
|
contentBase: src,
|
||||||
publicPath: dest
|
publicPath: dest
|
||||||
},
|
},
|
||||||
|
|
||||||
markdownLoader: {
|
markdownLoader: {
|
||||||
langPrefix: 'language-',
|
langPrefix: 'language-',
|
||||||
highlight: function (code, lang) {
|
highlight: function (code, lang) {
|
||||||
@@ -107,8 +107,21 @@ var config = {
|
|||||||
// Support for .ts files.
|
// Support for .ts files.
|
||||||
{
|
{
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
loader: 'typescript-simple',
|
loader: 'ts',
|
||||||
|
query: {
|
||||||
|
ignoreDiagnostics: [
|
||||||
|
// TS2305 -> Module 'ng' has no exported member
|
||||||
|
2305,
|
||||||
|
// TS2307 -> Cannot find external module
|
||||||
|
2307,
|
||||||
|
// TS2300 -> Duplicate identifier
|
||||||
|
2300,
|
||||||
|
// TS2309 -> An export assignment cannot be used in a module with other exported elements.
|
||||||
|
2309
|
||||||
|
]
|
||||||
|
},
|
||||||
exclude: [
|
exclude: [
|
||||||
|
/\.min\.js$/,
|
||||||
/\.spec\.ts$/,
|
/\.spec\.ts$/,
|
||||||
/\.e2e\.ts$/,
|
/\.e2e\.ts$/,
|
||||||
/web_modules/,
|
/web_modules/,
|
||||||
@@ -118,7 +131,8 @@ var config = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
noParse: [
|
noParse: [
|
||||||
/rtts_assert\/src\/rtts_assert/
|
/rtts_assert\/src\/rtts_assert/,
|
||||||
|
/reflect-metadata/
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -160,9 +174,7 @@ var config = {
|
|||||||
minRatio: 0.8
|
minRatio: 0.8
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
},
|
}
|
||||||
|
|
||||||
stats: {colors: true, reasons: true}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config.pushPlugins();
|
config.pushPlugins();
|
||||||
|
|||||||
Reference in New Issue
Block a user