Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed onFileError callback #28

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
bower_components
.idea
106 changes: 60 additions & 46 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,69 @@
module.exports = function(grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: ['src/**/*.js','src/**/**/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
jshint: {
files: ['Gruntfile.js', 'src/**/*.js', 'src/**/**/*.js'],
options: {
// options here to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true,
document: true
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
folders: {
bower: './bower_components',
source: './src/js',
plupload: '<%= folders.bower %>/plupload/js'
},

concat: {
options: {
separator: ';'
},
dist: {
src: [
'<%= folders.source %>/plupload-angular-directive.js',
'<%= folders.plupload %>/plupload.full.js'
],
dest: 'dist/<%= pkg.name %>.js'
}
},

uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},

jshint: {
options: {
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
},
files: ['src/js/plupload-angular-directive.js']
},

copy: {
main: {
files: [
{expand: false, src: ['<%= folders.plupload %>/plupload.flash.swf'], dest: 'dist/plupload.flash.swf'},
{expand: false, src: ['<%= folders.plupload %>/plupload.silverlight.xap'], dest: 'dist/plupload.silverlight.xap'},
{expand: false, src: ['<%= folders.plupload %>/plupload.flash.cors.swf'], dest: 'dist/plupload.flash.cors.swf'},
{expand: false, src: ['<%= folders.plupload %>/plupload.silverlight.cors.xap'], dest: 'dist/plupload.silverlight.cors.xap'}
]
}
}
}
},
copy: {
main: {
files: [
{expand: false, src: ['src/lib/plupload/plupload.flash.swf'], dest: 'dist/plupload.flash.swf'},
{expand: false, src: ['src/lib/plupload/plupload.silverlight.xap'], dest: 'dist/plupload.silverlight.xap'},
]
}
}
});

grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-conventional-changelog');

grunt.registerTask('test', ['jshint']);
grunt.registerTask('test', ['jshint']);

grunt.registerTask('build', ['jshint', 'concat', 'uglify','copy']);
grunt.registerTask('build', ['jshint', 'concat', 'uglify', 'copy']);

};
8 changes: 6 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "plupload-angular-directive",
"homepage": "https://github.com/sahusoftcom/plupload-angular-directive",
"authors": [
"Robin van Baalen <[email protected]>",
"Sanket <[email protected]>",
"Saurabh <[email protected]>"
],
"description": "An angular JS wrapper for plUpload with the latest plupload build files included",
"main": "dist/plupload-angular-directive.min.js",
"main": "dist/plupload-angular-directive.js",
"moduleType": [
"globals"
],
Expand All @@ -24,5 +25,8 @@
"bower_components",
"test",
"tests"
]
],
"dependencies": {
"plupload": "1.5.*"
}
}
Loading