Coder Social home page Coder Social logo

angular2-packaging's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

angular2-packaging's Issues

Gulp file not working (missing files in the output)

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:

http://stackoverflow.com/questions/38376567/how-to-correctly-bundle-an-angular2-js-typescript-app-via-gulp

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

Firebase still not defined

You need to import the firebase service to your app component to see the firebase error.

so far your not using the firebase test service so your not seeing the error.

How to et environment = production

I managed to adapt this started template to the project I'm currently working on.

Both work correctly:

  • gulp serve-dev
  • gulp serve-build

However I can't manage to set production environment:

 NODE_ENV=production && gulp serve-build # or NODE_ENV="production" && gulp serve-build

still prints:

Current environment: development
Change environment via --env or NODE_ENV

  gulp serve-dev --env production # or gulp --env production serve-dev

returns this error:

Task 'serve-build' is not in your gulpfile

Any clue?
Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.