ng-file-upload
Advanced tools
Comparing version 4.2.4 to 5.0.0
227
Gruntfile.js
@@ -1,108 +0,129 @@ | ||
module.exports = function(grunt) { | ||
grunt.initConfig({ | ||
pkg : grunt.file.readJSON('package.json'), | ||
'use strict'; | ||
copy : { | ||
build : { | ||
options : { | ||
processContent : function(content, srcpath) { | ||
return grunt.template.process(content); | ||
} | ||
}, | ||
files : [ { | ||
expand : true, | ||
cwd : 'demo/war/js/', | ||
src : 'ng-file-upload*.js', | ||
dest : 'dist/', | ||
flatten : true, | ||
filter : 'isFile' | ||
}] | ||
}, | ||
fileapi: { | ||
files: [{ | ||
expand : true, | ||
cwd : 'demo/war/js/', | ||
src : 'FileAPI.flash.swf', | ||
dest : 'dist/', | ||
flatten : true, | ||
filter : 'isFile' | ||
}, { | ||
expand : true, | ||
cwd : 'demo/war/js/', | ||
src : 'FileAPI.js', | ||
dest : 'dist/', | ||
flatten : true, | ||
filter : 'isFile' | ||
} ] | ||
}, | ||
bower : { | ||
files : [ { | ||
expand : true, | ||
cwd : 'dist/', | ||
src : '*', | ||
dest : '../angular-file-upload-bower/', | ||
flatten : true, | ||
filter : 'isFile' | ||
}, { | ||
expand : true, | ||
cwd : 'dist/', | ||
src : '*', | ||
dest : '../angular-file-upload-shim-bower/', | ||
flatten : true, | ||
filter : 'isFile' | ||
} ] | ||
} | ||
}, | ||
concat: { | ||
dist: { | ||
options: { | ||
process: function(content, srcpath) { | ||
return grunt.template.process(content); | ||
} | ||
}, | ||
files: { | ||
'demo/war/js/ng-file-upload-all.js': | ||
['demo/war/js/ng-file-upload.js', | ||
'demo/war/js/ng-file-upload-shim.js'] | ||
} | ||
} | ||
}, | ||
uglify : { | ||
options : { | ||
banner : '/*! <%= pkg.version %> */\n' | ||
}, | ||
build : { | ||
files : [ { | ||
'dist/ng-file-upload.min.js' : 'dist/ng-file-upload.js', | ||
'dist/ng-file-upload-shim.min.js' : 'dist/ng-file-upload-shim.js', | ||
'dist/ng-file-upload-all.min.js' : 'dist/ng-file-upload-all.js', | ||
'dist/FileAPI.min.js' : 'dist/FileAPI.js', | ||
'demo/war/js/FileAPI.min.js' : 'demo/war/js/FileAPI.js' | ||
} ] | ||
} | ||
}, | ||
replace : { | ||
version : { | ||
src: ['nuget/Package.nuspec', '../angular-file-upload-bower/bower.json', | ||
'../angular-file-upload-shim-bower/bower.json' | ||
], | ||
overwrite: true, | ||
replacements: [{ | ||
from: /"version" *: *".*"/g, | ||
to: '"version": "<%= pkg.version %>"' | ||
}, { | ||
from: /<version>.*<\/version>/g, | ||
to: '<version><%= pkg.version %></version>' | ||
}] | ||
} | ||
} | ||
}); | ||
module.exports = function (grunt) { | ||
// Load grunt tasks automatically | ||
require('load-grunt-tasks')(grunt); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-text-replace'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
concat: { | ||
all: { | ||
options: { | ||
process: function (content) { | ||
return grunt.template.process(content); | ||
} | ||
}, | ||
files: { | ||
'dist/ng-file-upload.js': ['src/upload.js', 'src/select.js', 'src/drop.js'], | ||
'dist/ng-file-upload-shim.js': ['src/shim-upload.js', 'src/shim-elem.js', 'src/shim-filereader.js'], | ||
'dist/ng-file-upload-all.js': ['dist/ng-file-upload.js', 'dist/ng-file-upload-shim.js'] | ||
} | ||
} | ||
}, | ||
uglify: { | ||
options: { | ||
preserveComments: 'some', | ||
banner: '/*! <%= pkg.version %> */\n' | ||
}, | ||
grunt.registerTask('default', [ 'concat:dist', 'copy:build', 'copy:fileapi', 'uglify', 'copy:bower', 'replace:version' ]); | ||
build: { | ||
files: [{ | ||
'dist/ng-file-upload.min.js': 'dist/ng-file-upload.js', | ||
'dist/ng-file-upload-shim.min.js': 'dist/ng-file-upload-shim.js', | ||
'dist/ng-file-upload-all.min.js': 'dist/ng-file-upload-all.js', | ||
'dist/FileAPI.min.js': 'dist/FileAPI.js' | ||
}] | ||
} | ||
}, | ||
copy: { | ||
build: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'dist/', | ||
src: '*', | ||
dest: 'demo/src/main/webapp/js/', | ||
flatten: true, | ||
filter: 'isFile' | ||
}] | ||
}, | ||
fileapi: { | ||
files: { | ||
'dist/FileAPI.flash.swf': 'src/FileAPI.flash.swf', | ||
'dist/FileAPI.js': 'src/FileAPI.js' | ||
} | ||
}, | ||
bower: { | ||
files: [{ | ||
expand: true, | ||
cwd: 'dist/', | ||
src: '*', | ||
dest: '../angular-file-upload-bower/', | ||
flatten: true, | ||
filter: 'isFile' | ||
}, { | ||
expand: true, | ||
cwd: 'dist/', | ||
src: '*', | ||
dest: '../angular-file-upload-shim-bower/', | ||
flatten: true, | ||
filter: 'isFile' | ||
}] | ||
} | ||
}, | ||
serve: { | ||
options: { | ||
port: 9000 | ||
}, | ||
'path': 'demo/src/main/webapp' | ||
}, | ||
watch: { | ||
js: { | ||
files: ['src/{,*/}*.js'], | ||
tasks: ['jshint:all', 'concat:all', 'uglify', 'copy:build'] | ||
} | ||
}, | ||
jshint: { | ||
options: { | ||
jshintrc: '.jshintrc', | ||
reporter: require('jshint-stylish') | ||
}, | ||
all: [ | ||
'Gruntfile.js', | ||
'src/{,*/}*.js', | ||
'!src/FileAPI*.*', | ||
'test/spec/{,*/}*.js' | ||
] | ||
}, | ||
replace: { | ||
version: { | ||
src: ['nuget/Package.nuspec', '../angular-file-upload-bower/bower.json', | ||
'../angular-file-upload-shim-bower/bower.json' | ||
], | ||
overwrite: true, | ||
replacements: [{ | ||
from: /"version" *: *".*"/g, | ||
to: '"version": "<%= pkg.version %>"' | ||
}, { | ||
from: /<version>.*<\/version>/g, | ||
to: '<version><%= pkg.version %></version>' | ||
}] | ||
} | ||
}, | ||
clean: { | ||
dist: { | ||
files: [{ | ||
dot: true, | ||
src: [ | ||
'dist', | ||
'!dist/.git*' | ||
] | ||
}] | ||
} | ||
} | ||
}); | ||
grunt.registerTask('dev', ['jshint:all', 'concat:all', 'uglify', 'copy:build', 'watch']); | ||
grunt.registerTask('default', ['jshint:all', 'clean:dist', 'concat:all', | ||
'copy:fileapi', 'uglify', 'copy:build', 'copy:bower', 'replace:version']); | ||
}; |
{ | ||
"name": "ng-file-upload", | ||
"version": "4.2.4", | ||
"version": "5.0.0", | ||
"devDependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-uglify": "~0.2.7", | ||
"grunt": "^0.4.5", | ||
"grunt-contrib-concat": "^0.5.1", | ||
"grunt-contrib-clean": "^0.6.0", | ||
"grunt-contrib-jshint": "^0.11.0", | ||
"grunt-contrib-uglify": "^0.8.0", | ||
"grunt-contrib-watch": "^0.6.1", | ||
"grunt-contrib-copy": "~0.4.1", | ||
"grunt-text-replace": "~0.3.12", | ||
"grunt-git": "~0.2.14" | ||
"grunt-git": "~0.2.14", | ||
"grunt-serve": "^0.1.6", | ||
"jshint-stylish": "^1.0.0", | ||
"load-grunt-tasks": "^3.1.0" | ||
}, | ||
"dependencies": { | ||
"grunt-contrib-concat": "~0.5.0" | ||
}, | ||
"description": "ng-file-upload ===================", | ||
"description": "An AngularJS directive for file upload using HTML5 with FileAPI polyfill for unsupported browsers", | ||
"main": "dist/ng-file-upload-all.js", | ||
@@ -16,0 +20,0 @@ "scripts": { |
@@ -89,4 +89,3 @@ ng-file-upload | ||
ng-model-rejected="rejFiles" // bind to dropped files that do not match the accept wildcard | ||
ngf-change="fileSelected($files, $event)" // will be called upon files being selected | ||
// you can use $scope.$watch('myFiles') instead | ||
ngf-change="fileSelected($files, $event)" // called when files are selected or removed | ||
ngf-multiple="true" or "false" // default false, allows selecting multiple files | ||
@@ -102,6 +101,7 @@ ngf-capture="'camera'" or "'other'" // allows mobile devices to capture using camera | ||
```html | ||
All attributes are optional except ngf-drop and one of ng-model or ngf-change. | ||
<div|button|ngf-drop|... | ||
ngf-drop ng-model="myFiles" // binds the dropped files to the scope model | ||
ng-model-rejected="rejFiles" // bind to dropped files that do not match the accept wildcard | ||
ngf-change="fileDropped($files, $event, $rejectedFiles)" //called upon files being dropped | ||
ngf-change="fileDropped($files, $event, $rejectedFiles)" //called when files being dropped | ||
ngf-multiple="true" or "false" // default false, allows selecting multiple files. | ||
@@ -108,0 +108,0 @@ ngf-accept="'.pdf,.jpg'" or "validate($file)" // function or comma separated wildcard to filter files allowed |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2688186
0
96
17361
12
2
- Removedgrunt-contrib-concat@~0.5.0
- Removedabbrev@1.1.1(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedansi-regex@0.2.1(transitive)
- Removedansi-styles@1.1.04.3.0(transitive)
- Removedargparse@1.0.10(transitive)
- Removedarray-each@1.0.1(transitive)
- Removedarray-slice@1.1.0(transitive)
- Removedasync@3.2.6(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbraces@3.0.3(transitive)
- Removedchalk@0.5.14.1.2(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcolors@1.1.2(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddateformat@4.6.3(transitive)
- Removeddetect-file@1.0.0(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesprima@4.0.1(transitive)
- Removedeventemitter2@0.4.14(transitive)
- Removedexit@0.1.2(transitive)
- Removedexpand-tilde@2.0.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedfindup-sync@4.0.05.0.0(transitive)
- Removedfined@1.2.0(transitive)
- Removedflagged-respawn@1.0.1(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfor-own@1.0.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedgetobject@1.0.2(transitive)
- Removedglob@7.1.7(transitive)
- Removedglobal-modules@1.0.0(transitive)
- Removedglobal-prefix@1.0.2(transitive)
- Removedgrunt@1.6.1(transitive)
- Removedgrunt-cli@1.4.3(transitive)
- Removedgrunt-contrib-concat@0.5.1(transitive)
- Removedgrunt-known-options@2.0.0(transitive)
- Removedgrunt-legacy-log@3.0.0(transitive)
- Removedgrunt-legacy-log-utils@2.1.0(transitive)
- Removedgrunt-legacy-util@2.0.1(transitive)
- Removedhas-ansi@0.1.0(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhomedir-polyfill@1.0.3(transitive)
- Removedhooker@0.2.3(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedini@1.3.8(transitive)
- Removedinterpret@1.1.0(transitive)
- Removedis-absolute@1.0.0(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-relative@1.0.0(transitive)
- Removedis-unc-path@1.0.0(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisexe@2.0.0(transitive)
- Removedisobject@3.0.1(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedkind-of@6.0.3(transitive)
- Removedliftup@3.0.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmake-iterator@1.0.1(transitive)
- Removedmap-cache@0.2.2(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedminimatch@3.0.8(transitive)
- Removednopt@3.0.64.0.3(transitive)
- Removedobject.defaults@1.1.0(transitive)
- Removedobject.map@1.0.1(transitive)
- Removedobject.pick@1.3.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedosenv@0.1.5(transitive)
- Removedparse-filepath@1.0.2(transitive)
- Removedparse-passwd@1.0.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-root@0.1.1(transitive)
- Removedpath-root-regex@0.1.2(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedrechoir@0.7.1(transitive)
- Removedresolve@1.22.8(transitive)
- Removedresolve-dir@1.0.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsource-map@0.3.0(transitive)
- Removedsprintf-js@1.0.31.1.3(transitive)
- Removedstrip-ansi@0.3.0(transitive)
- Removedsupports-color@0.2.07.2.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedunc-path-regex@0.1.2(transitive)
- Removedunderscore.string@3.3.6(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedv8flags@3.2.0(transitive)
- Removedwhich@1.3.12.0.2(transitive)
- Removedwrappy@1.0.2(transitive)