diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7ba97ec --- /dev/null +++ b/.gitignore @@ -0,0 +1,54 @@ +###SublimeText### + +# SublimeText project files +*.sublime-workspace + + +###OSX### + +.DS_Store +.AppleDouble +.LSOverride +Icon + + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + + +###Windows### + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + + +###Node### + +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log +node_modules + +.tern-project \ No newline at end of file diff --git a/bower.json b/bower.json index e15976e..59a9a70 100644 --- a/bower.json +++ b/bower.json @@ -19,5 +19,15 @@ "homepage": "https://github.com/kyjan/angular-sails", "dependencies": { "angular": ">=1.2.*" - } + }, + "ignore": [ + "**/.*", + "gulpfile.js", + "package.json", + "node_modules", + "bower_components", + "app/bower_components", + "test", + "tests" + ] } diff --git a/dist/angular-sails.min.js b/dist/angular-sails.min.js index 7ab2f3d..36ab61a 100644 --- a/dist/angular-sails.min.js +++ b/dist/angular-sails.min.js @@ -1 +1 @@ -(function(e,t){"use strict";var n=e.module("ngSails",[]);n.provider("$sails",function(){var n=this;this.url=undefined;this.interceptors=[];this.$get=["$q","$timeout",function(r,i){var s=t.connect(n.url),o=function(){var e=r.defer(),t=e.promise;t.success=function(e){t.then(function(t){e(t)});return t};t.error=function(e){t.then(null,function(t){e(t)});return t};return e},u=function(t,n){if(n&&e.isObject(n)&&n.status&&Math.floor(n.status/100)!==2){t.reject(n)}else{t.resolve(n)}},a=function(e,t){i(function(){e(t)})};s.legacy_get=s.get;s.legacy_post=s.post;s.legacy_put=s.put;s.legacy_delete=s["delete"];s.legacy_on=s.on;s.legacy_once=s.once;s.get=function(t,n,r){var i=o();if(r===undefined&&e.isFunction(n)){r=n;n=null}i.promise.then(r);s.legacy_get(t,n,function(e){u(i,e)});return i.promise};s.post=function(t,n,r){var i=o();if(r===undefined&&e.isFunction(n)){r=n;n=null}i.promise.then(r);s.legacy_post(t,n,function(e){u(i,e)});return i.promise};s.put=function(t,n,r){var i=o();if(r===undefined&&e.isFunction(n)){r=n;n=null}i.promise.then(r);s.legacy_put(t,n,function(e){u(i,e)});return i.promise};s["delete"]=function(t,n,r){var i=o();if(r===undefined&&e.isFunction(n)){r=n;n=null}i.promise.then(r);s.legacy_delete(t,n,function(e){u(i,e)});return i.promise};s.on=function(t,n){if(n!==undefined&&e.isFunction(n)){s.legacy_on(t,function(e){a(n,e)})}};s.once=function(t,n){if(n!==undefined&&e.isFunction(n)){s.legacy_once(t,function(e){a(n,e)})}};return s}]})})(angular,io) \ No newline at end of file +!function(n,t){"use strict";var e=n.module("ngSails",[]);e.provider("$sails",function(){var e=this,o=["get","post","put","delete"],i=["on","once"];this.url=void 0,this.interceptors=[],this.$get=["$q","$timeout",function(r,u){var c=t.connect(e.url),s=function(){var n=r.defer(),t=n.promise;return t.success=function(n){return t.then(n)},t.error=function(n){return t.then(null,n)},n},f=function(t,e){e&&n.isObject(e)&&e.status&&2!==Math.floor(e.status/100)?t.reject(e):t.resolve(e)},l=function(n,t){u(function(){n(t)})},a=function(t){c["legacy_"+t]=c[t],c[t]=function(e,o,i){var r=s();return void 0===i&&n.isFunction(o)&&(i=o,o=null),r.promise.then(i),c["legacy_"+t](e,o,function(n){f(r,n)}),r.promise}},h=function(t){c["legacy_"+t]=c[t],c[t]=function(e,o){null!=o&&n.isFunction(o)&&c["legacy_"+t](e,function(n){l(o,n)})}};return n.forEach(o,a),n.forEach(i,h),c}]})}(angular,io); \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..0fbac6b --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,16 @@ +var gulp = require('gulp'); +var concat = require('gulp-concat'); +var uglify = require('gulp-uglify'); + +gulp.task('build-js', function () { + gulp.src('src/**/*.js') + .pipe(concat('angular-sails.min.js')) + .pipe(uglify()) + .pipe(gulp.dest('./dist/')); +}); + +gulp.task('watch', function () { + gulp.watch('src/**/*.js', ['build-js']); +}); + +gulp.task('default', ['build-js', 'watch']); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..162b187 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "angular-sails", + "private": true, + "version": "0.1.0", + "description": "An angular provider for using the sails socket.io api", + "repository": { + "type": "git", + "url": "https://github.com/kyjan/angular-sails.git" + }, + "author": "Jan-Oliver Pantel ", + "license": "MIT", + "bugs": { + "url": "https://github.com/kyjan/angular-sails/issues" + }, + "homepage": "https://github.com/kyjan/angular-sails", + "devDependencies": { + "gulp": "^3.5.6", + "gulp-concat": "^2.2.0", + "gulp-uglify": "^0.2.1" + } +}