antonybudianto / angular-starter

:star: Gulp Angular Starter using TypeScript (Updated to 4.4.3)
https://antonybudianto.github.io/angular-starter/
MIT License
523 stars 147 forks source link

Are you using angular-starter? Please comment here! #93

Open antonybudianto opened 8 years ago

antonybudianto commented 8 years ago

Hi everyone ✋ I would like to know who are using angular-starter and how you use it.

Please share your experiences and usage below!

Thank you ❤️

Please don't post starter's issue in this thread

talmog commented 8 years ago

Using it since January 2016 and very happy with it! thank you!

kennyhyun commented 8 years ago

Using it from Mar 2016 in my project. in development, not went production yet.

I appreciate your efforts to improve it. Hope to catch up with your latest version ;)

isener commented 8 years ago

Your readme is really well, why don't you put it on as installer in yeoman? this would be nice think that.

antonybudianto7 commented 8 years ago

@isener , thank you, I'll try investigate it, maybe I'm going to use https://github.com/addyosmani/generator-boilerplate

currentcolor commented 8 years ago

Using Starter since May, have switched to the latest version. Works like a charm!

Am waiting when Angular 2 reaches general release stage (to avoid breaking changes) and then, hopefully, will give it a try in production.

isener commented 8 years ago

@reevader Angular 2 in RC now, isn't that make sense to use in production? I guess they won't make critically changes on it.

currentcolor commented 8 years ago

@isener Depends on your needs. Some parts (router, i18n, angular-cli) are still a work in progress. For experienced Angular devs it may be the right time. Anyway, final release is supposed to happen soon.

WarDrummer commented 8 years ago

@antonybudianto Great work! Thank you very much for creating this project. I'm using it to evaluate the viability of the Angular2 stack for my next project.

Everything is working great, but I need to be fully integrated with WebStorm. Can someone provide guidance on how to debug the following in WebStorm:

debugger; will stop execution in WebStorm and I can step from there. However, if I set a breakpoint in WebStorm, execution will not stop.

antonybudianto commented 8 years ago

@jrpdrummer, so far no luck using IDE breakpoint from vscode too, will try https://github.com/Microsoft/vscode-chrome-debug later

WarDrummer commented 8 years ago

@antonybudianto It seems the problem might be related to the sourceMap files. The source maps and JS files are referenced from the TMP dir and attempt to reference the TS files in the app dir. You can manually change the map files to point to ../src/app/.. and the break points work from the IDE. Not sure what needs to happen to make this work without editing the source maps, yet.

antonybudianto commented 8 years ago

@jrpdrummer , currently the sourcemap should be inlined, so it should be no problem for most cases, unless it didn't support sourcemap. Oh yes, let's discuss it here #102

IntelliShop-G-Schuster commented 8 years ago

Using it since yesterday as it is the only complete and working solution that is up-to-date with RC and using current router. Only problem I have for now is with component-relative assets, e.g. images in CSS url(). Any idea on how to tackle this issue?

antonybudianto commented 8 years ago

https://angular.io/docs/ts/latest/cookbook/component-relative-paths.html @IntelliShop-G-Schuster

IntelliShop-G-Schuster commented 8 years ago

Thanks for the link, I know how to set relative paths for templateUrl / styleUrls - the problem is in the CSS files themselves, e.g. "background: url(images/bg.png)" - those need to be relative to the component (e.g. /app/mycomp/images/bg.png), but as the CSS is inlined those are relative to index.html (/images/bg.png).

antonybudianto commented 8 years ago

@IntelliShop-G-Schuster , looks like not possible for now, thanks for the feedback though

foxjazz commented 8 years ago

I am using it again. I had to revert back because rc4 update messed up a bunch of things for me. Don't forget to upgrade the router. Also having some issues with my router config currently. Will revisit later.

antonybudianto commented 8 years ago

I've updated the router to latest beta, nothing breaks on the starter base @foxjazz

lpotapczuk commented 8 years ago

Hey @antonybudianto ,

Thanks for a this great project! It's a blast to develop with this structure.

The only thing I had issues with is adding static htmls - do you have any suggestions on that?

antonybudianto commented 8 years ago

@lpotapczuk sorry, I don't get what adding static htmls means, do you have an example/use case?

lpotapczuk commented 8 years ago

@antonybudianto , yes, of course!

I have already existing project, that I build into the following structure:

index.html (not angular app root) subpage1.html subpage2.html app.html /app /assets

Now, in your project, I can get my app working, but I cant add some pure static html files. I guess I would need to adjust the tasks in gulp, is that correct?

antonybudianto commented 8 years ago

@lpotapczuk i see, for now you can't add static html files without wrapping it into components inside /app folder, you need to adjust some tasks in gulp . i'd suggest to move all html (except index.html) into app folder, then wrap it into components, it's better imo.

mazhekin commented 8 years ago

Hi, Antony! Very nice starter! But where is the node js server to deploy it? (for example to heroku)

antonybudianto commented 8 years ago

Hi @mazhekin , you can deploy the build folder (generated by npm run build) into any web server like Node, nginx, apache, github pages, and others, since the build result is only static files.

emanuelet commented 8 years ago

We're developing on it from March and about to deploy to production in a week. We've attempted to use Polymer elements with Angular 2 and right now we're encountering some issues to get useref to combine them properly. Did anyone has tried as well?

antonybudianto commented 8 years ago

@emanuelet , never tried it. but useref should work for most non-module JS lib/plugins

emanuelet commented 8 years ago

Ok, in the end I've able to get it to work, but it hasn't been easy to figure out.

So this has to go in the index.html (notice the I had to spin-off the Polymer initialization to its own file)

    <!-- build:js assets/webcomponents.js -->
    <script src="/assets/components/webcomponentsjs/webcomponents.js"></script>
    <!-- endinject -->
    <!-- build:js assets/polymer.js -->
    <script src="/assets/scripts/polymer.js"></script>
    <!-- endinject -->
    <!-- build:custom elements.html -->
    <link rel="import" href="/assets/components/polymer/polymer.html">
    <link rel="import" href="/assets/components/paper-button/paper-button.html">
    <link rel="import" href="/assets/components/paper-input/paper-input.html">
    <!-- endinject -->

And this is the change needed in the build.js

        gulp.src(config.assetsPath.components + '**/*.*', {
                base: config.assetsPath.components
            })
            .pipe(gulp.dest(config.build.assetPath + 'components'));

        gulp.src(config.index)
            .pipe(useref({
                custom: function(content, target) {
                    return content === '/assets/components' ? target : content;
                }
            }))

useref is still not able to combine the html files but now it will keep the references instead of stripping them

antonybudianto commented 8 years ago

i think useref is for combining css and js files only, not for html files, described in https://www.npmjs.com/package/gulp-useref

type: either js, css or remove; remove will remove the build block entirely without generating a file
emanuelet commented 8 years ago

It is, but the problem with Polymer is that it uses html imports. There is actually somebody that had tried to hack it out tho https://github.com/hyperbrave/gulp-useref-import

antonybudianto commented 8 years ago

I see, I wonder if the custom elements html files can be used as templateUrl in angular2 component

dturska commented 8 years ago

You rock. Awesome job. thank you.

talmog commented 8 years ago

Hi, I have been using this starter from the start... Last week we went live with our app which is based on your starter. It is a freeware, so feel free to play around with it. Still very much in beta, so we did a very soft launch.

https://www.family.me

Thanks, Tomer

antonybudianto commented 8 years ago

Congratulations for the launch @talmog ! 👍

tsampath commented 8 years ago

Appreciate the effort you put on this.

Could you please let me know how I can add scss support on this starter?

Thanks ThusharaM

antonybudianto commented 8 years ago

@tsampath, The starter already include SASS gulp task

fintara commented 8 years ago

I use it too, like it very much. However with RC5 there is a problem only in production build, and I am not sure whether it's Angular or build-specific problem.

https://github.com/fintara/angular2-starter/commit/a3d9cf594999e33f758d0a6da5040456f16bec6b

npm start - todos work, npm run serve-build (or npm run build) - angular complains about [todo] of TodoComponent.

Thanks for any help. :)

antonybudianto commented 8 years ago

@fintara , It's angular issue https://github.com/angular/angular/issues/10618, for now try re-ordering your declaration fields.

ghost commented 8 years ago

Definitely one of the best starters out there (and I've almost tried them all)

Keep up the good work! Olaf

tsampath commented 8 years ago

I too tried few months ago. But couldn't access it from outside. Pls keep in mind that cloud 9 opens 8081, 8082 and 8083 only. I tried to run on those ports too. but had no luck.

antonybudianto commented 8 years ago

@tsampath , I'd suggest you check on browsersync doc for that. Also ask your hosting for assistance

tsampath commented 8 years ago

Thanks... btw could you please tell us any reason for defining a module per component as module is for owning set of Components, Directives, Providers ad Pipes for representing a feature according to this https://angular.io/docs/ts/latest/guide/ngmodule.html?

antonybudianto commented 8 years ago

@tsampath , because I tried to give example of feature module, of course you don't need to define one module per component

tsampath commented 8 years ago

Thanks for confirming...

DomiR commented 8 years ago

Would be nice to have gulp scss/stylus/css-preprocessor support for angular components styleUrls.

ghost commented 8 years ago

very useful, thank you very much!

oodgaard commented 7 years ago

This is the best angular 2 starter I have found so far. Nice work.

*edit: it seems strange you don't make use of: moduleId: module.id, in the components.

antonybudianto7 commented 7 years ago

@oodgaard because I didn't want to make it commonjs specific, because you can use module.id (commonjs) or require (webpack). Also ngc can handle relative path without module.id/require

antonybudianto commented 7 years ago

All, you can try on new Angular Webpack Starter which features AoT compilation, Lazy loading, and Tree shaking.

lpotapczuk commented 7 years ago

Hey guys!

I am wondering if there is any way to configure gulp to uglify the created .js file (using build task)? My main .js file weights 1.2mbs, which is quiet surprising...

antonybudianto commented 7 years ago

It's already uglified (yes, shockingly it's still big), you must use gzip compression to make it smaller. For now use Angular Webpack Starter for best result

lpotapczuk commented 7 years ago

This is what I've ended up doing. Reduced the size with gzip to 200kb's ;)

2016-09-28 15:13 GMT+02:00 Antony Budianto notifications@github.com:

It's already uglified (yes, shockingly it's still big), you must use gzip compression to get best result

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/antonybudianto/angular2-starter/issues/93#issuecomment-250162452, or mute the thread https://github.com/notifications/unsubscribe-auth/AJGRCkNJGR-LVkd6WxFVAvftKc9eEz8Iks5qumf-gaJpZM4IuQYK .

Pozdrawiam,

Łukasz Potapczuk