diff --git a/.gitignore b/.gitignore
index 9225f8c8..feefd2f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
node_modules
-tests/files/BigJPG.jpg
-tests/files/big.jpg
+dist/FileAPI.html5ok.js
+dist/FileAPI.html5ok.min.js
+dist/FileAPI.ok.js
+dist/FileAPI.ok.min.js
+.idea
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 00000000..191381ee
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1 @@
+.git
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 98f49b4b..1fdfc355 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
language: node_js
node_js:
- - 0.10
+ - 4.5
before_script:
- npm install -g grunt-cli
diff --git a/Gruntfile.js b/Gruntfile.js
index b7c9f352..9276a4b6 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,6 +10,7 @@ module.exports = function (grunt) {
'Gruntfile.js'
, 'lib/**/*.js'
, 'plugins/jquery.fileapi.js'
+ , 'node/**/*.js'
],
options: {
@@ -25,7 +26,6 @@ module.exports = function (grunt) {
, eqnull: true
, node: true
- , es5: true
, expr: true // - "Expected an assignment or function call and instead saw an expression."
, supernew: true // - "Missing '()' invoking a constructor."
, laxcomma: true
@@ -67,7 +67,7 @@ module.exports = function (grunt) {
options: {
timeout: 5 * 60 * 1000, // 5min
files: {
- '1px.gif': ['tests/files/1px.gif']
+ '1px_gif': ['tests/files/1px.gif']
, 'big.jpg': ['tests/files/big.jpg']
, 'hello.txt': ['tests/files/hello.txt']
, 'image.jpg': ['tests/files/image.jpg']
@@ -85,7 +85,7 @@ module.exports = function (grunt) {
' * <%= pkg.description %>\n' +
' */\n\n',
- footer: 'if( typeof define === "function" && define.amd ){ define("FileAPI", [], function (){ return FileAPI; }); }'
+ footer: 'if( typeof define === "function" && define.amd ){ define("<%= pkg.jam.name %>", [], function (){ return FileAPI; }); }'
},
all: {
@@ -131,7 +131,7 @@ module.exports = function (grunt) {
mxmlc: {
core: {
options: {
- rawConfig: '-static-link-runtime-shared-libraries=true -compiler.debug=true' +
+ rawConfig: '-target-player=10.1 -static-link-runtime-shared-libraries=true -compiler.debug=false' +
' -library-path+=flash/core/lib/blooddy_crypto.swc -library-path+=flash/core/lib/EnginesLibrary.swc'
},
files: {
@@ -140,7 +140,7 @@ module.exports = function (grunt) {
},
image: {
options: {
- rawConfig: '-static-link-runtime-shared-libraries=true -compiler.debug=true' +
+ rawConfig: '-static-link-runtime-shared-libraries=true -compiler.debug=false' +
' -library-path+=flash/image/lib/blooddy_crypto.swc'
},
files: {
@@ -149,7 +149,7 @@ module.exports = function (grunt) {
},
camera: {
options: {
- rawConfig: '-static-link-runtime-shared-libraries=true -compiler.debug=true'
+ rawConfig: '-static-link-runtime-shared-libraries=true -compiler.debug=false'
},
files: {
'dist/<%= pkg.exportName %>.flash.camera.swf': ['flash/camera/src/FileAPI_flash_camera.as']
@@ -176,17 +176,31 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-mxmlc');
grunt.loadNpmTasks('grunt-curl');
+
// Load custom QUnit task, based on grunt-contrib-qunit, but support "files" option.
grunt.loadTasks('./tests/grunt-task/');
grunt.loadTasks('./custom-tasks/');
// "npm build" runs these tasks
grunt.registerTask('prepare-test-files', function (){
- if (!grunt.file.exists('tests/files/big.jpg')) {
+ // big.jpg added to git
+ /*if (!grunt.file.exists('tests/files/big.jpg')) {
grunt.task.run('curl');
- }
+ }*/
+ });
+
+ grunt.registerTask('express', 'Start a custom web server.', function() {
+ var done = this.async();
+
+ require('./node/server.js').createServer(8000, function () {
+ done();
+ });
});
- grunt.registerTask('tests', ['jshint', 'concat', 'connect:server','prepare-test-files', 'qunit']);
- grunt.registerTask('build', ['version', 'concat', 'uglify', 'mxmlc']);
+
+ grunt.registerTask('server', ['connect:server', 'express']);
+ grunt.registerTask('dev', ['concat', 'server', 'watch']);
+ grunt.registerTask('tests', ['jshint', 'concat', 'server', 'prepare-test-files', 'qunit']);
+ grunt.registerTask('build', ['version', 'concat', 'uglify']);
+ grunt.registerTask('build-all', ['build', 'mxmlc']);
grunt.registerTask('default', ['tests', 'build']);
};
diff --git a/README.md b/README.md
index 23d505d2..b5037a77 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
## FileAPI
-A set of javascript tools for working with files.
+A set of JavaScript tools for working with files.
### Get started
@@ -10,9 +10,9 @@ Download the files from the [dist](https://github.com/mailru/FileAPI/tree/master
```html
- To view this page ensure that Adobe Flash Player version - ${version_major}.${version_minor}.${version_revision} or greater is installed. -
- -