-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Issues:
- with result Gulp I had to add gulp.task('default', ['app-bundle', 'vendor-bundle']);
- only 2 files are generated in ./dist : vendors.min.js (this seems ok), app.min.js (which is short but still I see files Were bundled ==> see output below). and no index.html...
In my try I used this Gulp file:
and at least the index.html was there even though there was the same issue.
app.min.js
var __decorate=this&&this.__decorate||function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},__metadata=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};System.register("app.service",["angular2/core","angular2/http","rxjs/Rx"],function(e,t){"use strict";var n,r,o;t&&t.id;return{setters:[function(e){n=e},function(e){r=e},function(e){}],execute:function(){o=function(){function e(e){this.http=e}return e.prototype.createAuthorizationHeader=function(e){e.append("Authorization","Basic "+btoa("a20e6aca-ee83-44bc-8033-b41f3078c2b6:c199f9c8-0548-4be7-9655-7ef7d7bf9d20"))},e.prototype.getCompanies=function(){var e=new r.Headers;return this.createAuthorizationHeader(e),this.http.get("https://angular2.apispark.net/v1/companies/",{headers:e}).map(function(e){return e.json()})},e=__decorate([n.Injectable(),__metadata("design:paramtypes",[r.Http])],e)}(),e("CompaniesService",o)}}}),System.register("app.component",["angular2/core","app.service"],function(e,t){"use strict";var n,r,o;t&&t.id;return{setters:[function(e){n=e},function(e){r=e}],execute:function(){o=function(){function e(e){var t=this;this.service=e,this.service.getCompanies().subscribe(function(e){t.companies=e})}return e=__decorate([n.Component({selector:"my-app",template:'\n <ul>\n <li *ngFor="#company of companies">{{company.name}}</li>\n </ul>\n '}),__metadata("design:paramtypes",[r.CompaniesService])],e)}(),e("AppComponent",o)}}}),System.register("boot",["angular2/platform/browser","angular2/http","app.component","app.service"],function(e,t){"use strict";var n,r,o,i;t&&t.id;return{setters:[function(e){n=e},function(e){r=e},function(e){o=e},function(e){i=e}],execute:function(){n.bootstrap(o.AppComponent,[r.HTTP_PROVIDERS,i.CompaniesService])}}}),System.register("test.service",["angular2/core"],function(e,t){"use strict";var n,r;t&&t.id;return{setters:[function(e){n=e}],execute:function(){r=function(){function e(){this.addNotification=function(){return new Promise(function(e,t){})},this.ref=new Firebase("_environment.firebaseUrl")}return e=__decorate([n.Injectable(),__metadata("design:paramtypes",[])],e)}(),e("TestService",r)}}}),document.addEventListener("DOMContentLoaded",function(){System["import"]("boot").then(null,console.error.bind(console))});
How to reproduce:
- git clone
- npm install
- gulp
- cd dist/
- python -m SimpleHTTPServer 9000 // or an alternative http server.
More details in my Stackoverflow question above