From 147956cd2717b8431c7eb827a17525080de3f2ab Mon Sep 17 00:00:00 2001 From: mtejedor Date: Mon, 30 Oct 2017 18:20:00 -0300 Subject: [PATCH] blablabla --- dist/am-communications.js | 84 +++++++++++++++++++++++++++++++++++++++ gulp/tasks/dist.js | 11 +++++ package.json | 3 +- yarn.lock | 41 +++++++++++++++---- 4 files changed, 130 insertions(+), 9 deletions(-) create mode 100644 dist/am-communications.js create mode 100644 gulp/tasks/dist.js diff --git a/dist/am-communications.js b/dist/am-communications.js new file mode 100644 index 0000000..d77c823 --- /dev/null +++ b/dist/am-communications.js @@ -0,0 +1,84 @@ +angular.module('am-communications').config([ + function () {} +]); + +angular.module( + 'am-communications', [ + 'loginUtils' + ] +); + +angular.module('am-communications').constant('configuration', { + apiUrl: 'localhost:3000' +}); + +angular.module('am-communications').constant('configuration', { + apiUrl: '/* @echo API_URL */' +}); + +angular.module('am-communications').constant('configuration', { + apiUrl: '/* @echo API_URL */' +}); + +angular + .module('am-communications') + .directive('amcWidget', function() { + return { + restrict: 'E', + templateUrl: 'app/directives/amcWidget.directive.html', + scope: {}, + controller: ['amcService', function(amcService) { + // console.log('Widget loaded'); + amcService.startConversation('name@example.com'); + }] + }; + }); + +angular + .module('am-communications') + .provider('amc', function() { + // console.log('loaded amc provider'); + + this.$get = function amcFactory() { + return this; + }; + }); + +angular + .module('am-communications') + .provider('layer', function() { + // console.log('loaded layer provider'); + + // this.auth = function() { + // console.log('authenticated layer provider'); + // }; + + this.$get = function layerFactory() { + return this; + }; + }); + +angular + .module('am-communications') + .service('amcService', function() { + this.startConversation = function(email) { + email.concat('asdf'); + // console.log(`llamada al servicio con el email: ${email}`); + }; + }); + +angular.module('am-communications').controller('Component1Controller', [ + function () { + + this.component1Phrase = 'This is component 1'; + + } +]); + +angular.module('am-communications').controller('Component2Controller', [ + function () { + + this.component2Phrase = 'This is component 2'; + + } +]); diff --git a/gulp/tasks/dist.js b/gulp/tasks/dist.js new file mode 100644 index 0000000..f952f72 --- /dev/null +++ b/gulp/tasks/dist.js @@ -0,0 +1,11 @@ +import gulp from 'gulp'; +import gulpLoadPlugins from 'gulp-load-plugins'; + +const plugins = gulpLoadPlugins(); + +gulp.task('dist', () => { + return gulp.src(`./src/**/*.js`) +// .pipe(plugins.order(config.jsOrder)) + .pipe(plugins.concat(`am-communications.js`)) + .pipe(gulp.dest('./dist/')) +}); diff --git a/package.json b/package.json index 1f8d00d..c29b362 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "angular-local-storage": "^0.5.2", "angular-mocks": "^1.5.8", "angular-translate": "^2.11.1", - "angular-ui-router": "^0.4.2" + "angular-ui-router": "^0.4.2", + "gulp-load-plugins": "^1.5.0" }, "devDependencies": { "babel-core": "^6.8.0", diff --git a/yarn.lock b/yarn.lock index 1562aed..df4c483 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1729,6 +1729,12 @@ depd@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" +dependency-graph@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.1.0.tgz#caec587b27b0c57d3fb6de5676c878ab251add87" + dependencies: + underscore "1.4.4" + deprecated@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" @@ -2381,7 +2387,7 @@ eyes@0.1.x: version "0.1.8" resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" -fancy-log@^1.1.0: +fancy-log@^1.1.0, fancy-log@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" dependencies: @@ -2481,7 +2487,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -findup-sync@^0.4.2: +findup-sync@^0.4.0, findup-sync@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12" dependencies: @@ -2895,6 +2901,13 @@ gulp-babel@^6.1.1: through2 "^2.0.0" vinyl-sourcemaps-apply "^0.2.0" +gulp-bower-src@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/gulp-bower-src/-/gulp-bower-src-0.1.0.tgz#137859b7e1f326b4a8d841d14ea1bba3ed6ed185" + dependencies: + dependency-graph "~0.1.0" + gulp-util "~2.2.0" + gulp-cached@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/gulp-cached/-/gulp-cached-1.1.1.tgz#fe7cd4f87f37601e6073cfedee5c2bdaf8b6acce" @@ -2992,6 +3005,18 @@ gulp-inject@^4.0.0: stream-to-array "^2.3.0" through2 "^2.0.1" +gulp-load-plugins@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/gulp-load-plugins/-/gulp-load-plugins-1.5.0.tgz#4c419f7e5764d9a0e33061bab9618f81b73d4171" + dependencies: + array-unique "^0.2.1" + fancy-log "^1.2.0" + findup-sync "^0.4.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + micromatch "^2.3.8" + resolve "^1.1.7" + gulp-match@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/gulp-match/-/gulp-match-1.0.3.tgz#91c7c0d7f29becd6606d57d80a7f8776a87aba8e" @@ -3135,7 +3160,7 @@ gulp-util@*, gulp-util@3.0.x, gulp-util@^3, gulp-util@^3.0, gulp-util@^3.0.0, gu through2 "^2.0.0" vinyl "^0.5.0" -gulp-util@^2.2.16: +gulp-util@^2.2.16, gulp-util@~2.2.0: version "2.2.20" resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-2.2.20.tgz#d7146e5728910bd8f047a6b0b1e549bc22dbd64c" dependencies: @@ -4357,7 +4382,7 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micromatch@2.3.11, micromatch@^2.1.5, micromatch@^2.3.7: +micromatch@2.3.11, micromatch@^2.1.5, micromatch@^2.3.7, micromatch@^2.3.8: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: @@ -6715,14 +6740,14 @@ unc-path-regex@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" +underscore@1.4.4, underscore@~1.4.4: + version "1.4.4" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" + underscore@1.7.x: version "1.7.0" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209" -underscore@~1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" - uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"