Skip to content

Commit

Permalink
Add husky
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Alferov committed Aug 21, 2015
1 parent 41230ad commit 13457e0
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 48 deletions.
2 changes: 0 additions & 2 deletions dist/angular-file-saver.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,5 @@ angular
};
}

module.exports = function (n) { return n * 111 }

},{}]},{},[1])(1)
});
2 changes: 1 addition & 1 deletion dist/angular-file-saver.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 38 additions & 40 deletions docs/dist/examples.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.angularFileSaver = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var angular = require('angular');
var fileSaver = require('../../../src/angular-file-saver');
window.saveAs = require('browser-filesaver');
Expand Down Expand Up @@ -28880,6 +28880,8 @@ if (typeof module !== "undefined" && module !== null) {
}

},{}],5:[function(require,module,exports){
'use strict';

/* angular-file-saver
*
* A AngularJS service that implements the HTML5 W3C saveAs() in browsers that
Expand All @@ -28890,53 +28892,49 @@ if (typeof module !== "undefined" && module !== null) {
*
*/

(function() {
'use strict';
angular
.module('fileSaver', [])
.factory('SaveAs', SaveAs);

angular
.module('fileSaver', [])
.factory('SaveAs', SaveAs);
function SaveAs() {

function SaveAs() {
function isBlobInstance (data) {
return data instanceof Blob;
}

function isBlobInstance (data) {
return data instanceof Blob;
function save(blob, filename) {
try {
saveAs(blob, filename);
} catch(err) {
console.error(err.message);
}
}

function save(blob, filename) {
try {
saveAs(blob, filename);
} catch(err) {
console.error(err.message);
}
}
return {

return {
/**
* saveFile - Immediately starts saving a file, returns undefined.
*
* @param {array|Blob} data Represented as an array or a Blob object
* @param {string} filename
* @param {object} options Set of Blob constructor options.
* Optional parameter, if Blob object is passed as first argument
* @return {undefined}
*/

/**
* saveFile - Immediately starts saving a file, returns undefined.
*
* @param {array|Blob} data Represented as an array or a Blob object
* @param {string} filename
* @param {object} options Set of Blob constructor options.
* Optional parameter, if Blob object is passed as first argument
* @return {undefined}
*/

download: function (data, filename, options) {
var blob;
data = data instanceof Array ? data : [data];

if (isBlobInstance(data)) {
save(data, filename);
}
download: function (data, filename, options) {
var blob;
data = data instanceof Array ? data : [data];

blob = new Blob(data, options);
save(blob, filename);
if (isBlobInstance(data)) {
save(data, filename);
}
};
}

})();
blob = new Blob(data, options);
save(blob, filename);
}
};
}

},{}]},{},[1]);
},{}]},{},[1])(1)
});
10 changes: 5 additions & 5 deletions docs/dist/examples.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@
"gulp-size": "^1.3.0",
"gulp-uglify": "^1.2.0",
"gulp-util": "^3.0.6",
"husky": "^0.9.3",
"run-sequence": "^1.1.2",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"watchify": "^3.3.1"
},
"scripts": {
"precommit": "gulp build"
}
}

0 comments on commit 13457e0

Please sign in to comment.