Giter Site home page Giter Site logo

nathanwalker / angular-seed-advanced Goto Github PK

View Code? Open in Web Editor NEW
2.3K 180.0 445.0 12.77 MB

Advanced Angular seed project with support for ngrx/store, ngrx/effects, ngx-translate, angulartics2, lodash, NativeScript (*native* mobile), Electron (Mac, Windows and Linux desktop) and more.

License: MIT License

TypeScript 79.94% HTML 6.49% CSS 2.90% JavaScript 10.66%
angular nativescript seed desktop aot mobile electron lodash ngrx angulartics2

angular-seed-advanced's Introduction

Please read this notice first before continuing.

Angular Seed Advanced

Angular Style Guide Build Status MIT license Dependency Status devDependency Status

This is an advanced seed project for Angular apps based on Minko Gechev's angular-seed that expands on all of its great features to include core support for:

Integration with:

Multiple Platforms
The zen of multiple platforms. Chrome, Android and iPhone all running the same code.
Desktop
Programming Nirvana. Mac and Windows desktop both running the same code.

Table of Contents

Advice: If your project is intended to target a single platform (i.e, web only), then angular-seed is likely more than suitable for your needs. However if your project goals are to target multiple platforms (web, native mobile and native desktop), with powerful out of the box library support and highly configurable/flexible testing options, then you might want to keep reading.

Too Much?!: Don't worry it's ok, I completely understand. There is a simplified version of this seed which still allows web + mobile + desktop without the extra libraries and features like ngrx or analytics. Give this a shot: https://github.com/jlooper/angular-starter

It's built with a lot of the same structure found here so things work the same but is definitely easier to start with if just getting into multi-platform development.

Prerequisites

Note you should have node v6.5.0 or higher and npm 3.10.3 or higher.

  • To run the NativeScript app (currently supports 3.x):
npm install -g nativescript

How to start

# install the project's dependencies
$ npm install
# fast install (via Yarn, https://yarnpkg.com)
$ yarn install  # or yarn

# watches your files and uses livereload by default
$ npm start
# api document for the app
# npm run build.docs

# generate api documentation
$ npm run compodoc
$ npm run serve.compodoc

# to start deving with livereload site and coverage as well as continuous testing
$ npm run start.deving

# dev build
$ npm run build.dev
# prod build
$ npm run build.prod

How to start with AoT

Note that AoT compilation requires node v6.5.0 or higher and npm 3.10.3 or higher.

In order to start the seed with AoT use:

# prod build with AoT compilation, will output the production application in `dist/prod`
# the produced code can be deployed (rsynced) to a remote server
$ npm run build.prod.aot

Mobile app

The mobile app is provided via NativeScript, an open source framework for building truly native mobile apps.

Setup

npm install -g nativescript 

Dev Workflow

You can make changes to files in src/client/app or nativescript/src/app folders. A symbolic link exists between the web src/client/app and the nativescript/src/app folder so changes in either location are mirrored because they are the same directory inside.

Create .tns.html and .tns.scss NativeScript view files for every web component view file you have. You will see an example of the app.component.html as a NativeScript view file here.

The root module for the mobile app is nativescript/src/native.module.ts: NativeModule.

Run

iOS:                      npm run start.ios   
iOS (device):             npm run start.ios.device

// or...

Android:                      npm run start.android
Android (device):             npm run start.android.device

OR...

Building with Webpack for release builds

Create AoT builds for deployment to App Store and Google Play.

Android:   npm run build.android
iOS:       npm run build.ios

Desktop app

The desktop app is provided via Electron, cross platform desktop apps with JavaScript, HTML, and CSS.

Develop

Mac:      npm run start.desktop
Windows:  npm run start.desktop.windows

Develop with livesync

Mac:      npm run start.livesync.desktop
Windows:  npm run start.livesync.desktop.windows

Release: Package Electron App for Mac, Windows or Linux

Mac:      npm run build.desktop.mac
Windows:  npm run build.desktop.windows
Linux:    npm run build.desktop.linux

Running tests

$ npm test

# Development. Your app will be watched by karma
# on each change all your specs will be executed.
$ npm run test.watch
# NB: The command above might fail with a "EMFILE: too many open files" error.
# Some OS have a small limit of opened file descriptors (256) by default
# and will result in the EMFILE error.
# You can raise the maximum of file descriptors by running the command below:
$ ulimit -n 10480


# code coverage (istanbul)
# auto-generated at the end of `npm test`
# view coverage report:
$ npm run serve.coverage

# e2e (aka. end-to-end, integration) - In three different shell windows
# Make sure you don't have a global instance of Protractor

# npm install webdriver-manager <- Install this first for e2e testing
# npm run webdriver-update <- You will need to run this the first time
$ npm run webdriver-start
$ npm run serve.e2e
$ npm run e2e

# e2e live mode - Protractor interactive mode
# Instead of last command above, you can use:
$ npm run e2e.live

You can learn more about Protractor Interactive Mode here

Web configuration options

Default application server configuration

var PORT             = 5555;
var LIVE_RELOAD_PORT = 4002;
var DOCS_PORT        = 4003;
var APP_BASE         = '/';

Configure at runtime

npm start -- --port 8080 --reload-port 4000 --base /my-app/

Environment configuration

If you have different environments and you need to configure them to use different end points, settings, etc. you can use the files dev.ts or prod.ts in./tools/env/. The name of the file is environment you want to use.

The environment can be specified by using:

$ npm start -- --env-config ENV_NAME

Currently the ENV_NAMEs are dev, prod, staging, but you can simply add a different file "ENV_NAME.ts". file in order to alter extra such environments.

Tools documentation

A documentation of the provided tools can be found in tools/README.md.

Code organization overview

  • nativescript: Root of this directory is reserved for mobile app.
    • src: mobile app src.
      • app: Symbolic link of shared code from web app.
      • App_Resources: iOS and Android platform specific config files and images.
      • mobile: Mobile specific services, etc. Build out mobile specific services here as well as overrides for web services that need to be provided for in the mobile app. Safe to import {N} modules here.
      • native.module.ts: Root module for the mobile app provided by NativeScript. Override/provide native mobile implementations of services here.
  • src/client: Root of this directory is reserved for web and desktop.
    • app: All the code in this directory is shared with the mobile app via a symbolic link.
      • components: Reserved for primary routing components. Since each app usually has it's own set of unique routes, you can provide the app's primary routing components here.
      • shared: Shared code across all platforms. Reusable sub components, services, utilities, etc.
        • analytics: Provides services for analytics. Out of the box, Segment is configured.
        • core: Low level services. Foundational layer.
        • electron: Services specific to electron integration. Could be refactored out in the future since this is not needed to be shared with the mobile app.
        • i18n: Various localization features.
        • ngrx: Central ngrx coordination. Brings together state from any other feature modules etc. to setup the initial app state.
        • sample: Just a sample module pre-configured with a scalable ngrx setup.
        • test: Testing utilities. This could be refactored into a different location in the future.
    • assets: Various locale files, images and other assets the app needs to load.
    • css: List of the main style files to be created via the SASS compilation (enabled by default).
    • scss: Partial SASS files - reserved for things like _variables.scss and other imported partials for styling.
    • index.html: The index file for the web and desktop app (which share the same setup).
    • main.desktop.ts: The file used by Electron to start the desktop app.
    • main.web.prod.ts: Bootstraps the AoT web build. Generally won't modify anything here
    • main.web.ts: Bootstraps the development web build. Generally won't modify anything here
    • package.json: Used by Electron to start the desktop app.
    • system-config.ts: This loads the SystemJS configuration defined here and extended in your own app's customized project.config.ts.
    • tsconfig.json: Used by compodoc - The missing documentation tool for your Angular application - to generate api docs for your code.
    • web.module.ts: The root module for the web and desktop app.
  • src/e2e: Integration/end-to-end tests for the web app.

How-tos

i18n

  • how to add a language?
    • src/client/assets/i18n/
      • add [language code].json (copy existing one and adapt the translation strings)
    • https://github.com/NathanWalker/angular-seed-advanced/blob/master/src/client/web.module.ts#L98-L101
      • Configure Languages InjectionToken with array of supported languages
    • src/client/app/modules/i18n/components/lang-switcher.component.spec.ts
      • fix test

Logging

  • what is the basic API surface around logging?

    • LogService is the main class that consumer code should use to write diagnostic information to one or more configured targets
    • LogTarget is an abstraction of where the log output is written. (e.g. ConsoleTarget writes diagnostics to the console)
    • LogTargetBase is a base abstract class that makes it easier to implement custom log target. It provides a way for inheritors to filter messages by importance.
    • LogLevel is level of importance associated with every log message (e.g. Debug, Info, Warning, Error)
  • how to control amount of information logged?

    • If a log target is derrived from LogTargetBase the target can be configured to filter messages by importance. You can pass minLogLevel as LogTargetOptions
    • LogService additionally uses Config.Debug switches as a global treshhold to further filter verbosity of the log messages.
  • how to implement custom log target?

    • Derrive from LogTargetBase class and implement writeToLog method (see ConsoleTarget). You can configure several log targets at a time inside main application module. For example:
    CoreModule.forRoot([
        { provide: WindowService, useFactory: (win) },
        { provide: ConsoleService, useFactory: (cons) },
        { provide: LogTarget, useFactory: (consoleLogTarget), deps: [ConsoleService], multi: true },
        { provide: LogTarget, useFactory: () => new LogStashTarget({minLogLevel: LogLevel.Debug}) }
      ]),

General best practice guide to sharing code

There’s actually only a few things to keep in mind when sharing code between web/mobile. The seed does take care of quite a few of those things but here’s a brief list:

  • Don’t import {N} modules into your components/services. {N} modules can only be used inside the {N} app therefore cannot be shared. To get around this, use InjectionToken's. Learn more here. A great example of how to integrate 2 different plugins (1 for web, 1 for {N}) and share all the code exists in this wiki article: How to integrate Firebase across all platforms written by the awesome Scott Lowe.
  • Use the conditional hooks provided by the seed in shared methods where you may need to handle something differently in {N} than you do on the web. For example, see here.
  • Don’t use window global. Inject the WindowService provided by the seed instead. This includes usage of alert, confirm, etc. For example:

If you were thinking about doing: alert('Something happened!');, Don't. Instead inject WindowService:

constructor(private win: WindowService) {}

public userAction() {
  if (success) {
    // do stuff
  } else {
    this.win.alert('Something happened!');
  }
}

This ensures that when the same code is run in the {N} app, the native dialogs module will be used.

The advice I like to give is:

Code with web mentality first. Then provide the native capability using Angular’s {provide: SomeWebService, useClass: SomeNativeService } during bootstrap.

There are some cases where you may want to use useValue vs. useClass, and other times may need to use useFactory. Read the Angular docs here to learn more about which you may need for your use case.

How best to use for your project

Setup

NOTE: This should be done first before you start making any changes and building out your project.

  1. git clone https://github.com/NathanWalker/angular-seed-advanced.git [your-project-name]
  2. cd [your-project-name]
  3. git remote set-url origin [your-project-git-repo] - This will setup origin properly.
  4. git remote add upstream https://github.com/NathanWalker/angular-seed-advanced.git - This will setup upstream properly to merge in upstream changes later.
  5. git push - Go ahead and push up the initial project.
  6. Now you have git setup and ready to develop your app as well as merge in upstream changes in the future.
  7. npm install (and all other usage docs in this README apply) - continue following instructions here.
  8. Create a new folder (or several sub-folders) for your app in src/client/app/shared to build your codebase out. Say your app is called AwesomeApp, then create awesomeapp and start building out all your components and services in there. Create other frameworks as you see fit to organize.

Merging latest upstream changes

  1. git fetch upstream - This will fetch latest upstream.
  2. git merge upstream/master - This will merge in upstream changes.
  3. Handle any conflicts to get latest upstream into your app.
  4. Continue building your app.

You can read more about syncing a fork here.

If you have any suggestions to this workflow, please post here.

Dockerization

The application provides full Docker support. You can use it for both development as well as production builds and deployments.

How to build and start the dockerized version of the application

The Dockerization infrastructure is described in the docker-compose.yml (respectively docker-compose.production.yml. The application consists of two containers:

  • angular-seed - In development mode, this container serves the angular app. In production mode it builds the angular app, with the build artifacts being served by the Nginx container
  • angular-seed-nginx - This container is used only production mode. It serves the built angular app with Nginx.

Development build and deployment

Run the following:

$ docker-compose build
$ docker-compose up -d

Now open your browser at http://localhost:5555

Production build and deployment

Run the following:

$ docker-compose -f docker-compose.production.yml build
$ docker-compose -f docker-compose.production.yml up angular-seed   # Wait until this container has finished building, as the nginx container is dependent on the production build artifacts
$ docker-compose -f docker-compose.production.yml up -d angular-seed-nginx  # Start the nginx container in detached mode

Now open your browser at http://localhost:5555

Contributing

Please see the CONTRIBUTING file for guidelines.

Awesome Contributors

mgechev NathanWalker ludohenin d3viant0ne Shyam-Chen Nightapes
mgechev NathanWalker ludohenin d3viant0ne Shyam-Chen Nightapes
tarlepp karlhaas m-abs robstoll TheDonDope nareshbhatia
tarlepp karlhaas m-abs robstoll TheDonDope nareshbhatia
hank-ehly kiuka vyakymenko jesperronn daniru aboeglin
hank-ehly kiuka vyakymenko jesperronn daniru aboeglin
nulldev07 eppsilon netstart sasikumardr gkalpak sfabriece
nulldev07 eppsilon netstart sasikumardr gkalpak sfabriece
JakePartusch ryzy markwhitfeld jvitor83 fulls1z3 ivannugo
JakePartusch ryzy markwhitfeld jvitor83 fulls1z3 ivannugo
pgrzeszczak treyrich natarajanmca11 e-oz Kaffiend nosachamos
pgrzeszczak treyrich natarajanmca11 e-oz Kaffiend nosachamos
jerryorta-dev alllx LuxDie JayKan JohnCashmore larsthorup
jerryorta-dev alllx LuxDie JayKan JohnCashmore larsthorup
ouq77 admosity Karasuni irsick StefanKoenen llwt
ouq77 admosity Karasuni irsick StefanKoenen llwt
amedinavalencia odk211 troyanskiy tsm91 hellofornow domfarolino
amedinavalencia odk211 troyanskiy tsm91 hellofornow domfarolino
VladimirMakaev juristr 730alchemy turbohappy devanp92 DmitriyPotapov
VladimirMakaev juristr 730alchemy turbohappy devanp92 DmitriyPotapov
evanplaice JunaidZA c-ice markharding ojacquemart patrickmichalina
evanplaice JunaidZA c-ice markharding ojacquemart patrickmichalina
rajeev-tripathi sanderbos1402 Sn3b TuiKiken gotenxds divramod
rajeev-tripathi sanderbos1402 Sn3b TuiKiken gotenxds divramod
edud69 idready kbrandwijk Yonet smac89 Green-Cat
edud69 idready kbrandwijk Yonet smac89 Green-Cat
ip512 joshboley Marcelh1983 Bigous robbatt yavin5
ip512 joshboley Marcelh1983 Bigous robbatt yavin5
alexweber vakrilov allenhwkim Falinor amaltsev yassirh
alexweber vakrilov allenhwkim Falinor amaltsev yassirh
bbarry urmaul sonicparke brendanbenson brian428 briantopping
bbarry urmaul sonicparke brendanbenson brian428 briantopping
ckapilla cadriel Cselt dszymczuk dmurat peah90
ckapilla cadriel Cselt dszymczuk dmurat peah90
dstockhammer dwido dcsw totev EddyVerbruggen ericdoerheit
dstockhammer dwido dcsw totev EddyVerbruggen ericdoerheit
ericli1018 Swiftwork fbascheper gsamokovarov koodikindral hpinsley
ericli1018 Swiftwork fbascheper gsamokovarov koodikindral hpinsley
NN77 isidroamv JohnnyQQQQ jeffbcross jlooper Jimmysh
NN77 isidroamv JohnnyQQQQ jeffbcross jlooper Jimmysh
Drane johnjelinek fourctv JunusErgin justindujardin karlhiramoto
Drane johnjelinek fourctv JunusErgin justindujardin karlhiramoto
lihaibh Brooooooklyn tandu inkidotcom mpetkov daixtrose
lihaibh Brooooooklyn tandu inkidotcom mpetkov daixtrose
Doehl MathijsHoogland mjwwit oferze ocombe gdi2290
Doehl MathijsHoogland mjwwit oferze ocombe gdi2290
typekpb peter-norton pavlovich philipooo pidupuis redian
typekpb peter-norton pavlovich philipooo pidupuis redian
robertpenner Sjiep RoxKilly siovene SamVerschueren sclausen
robertpenner Sjiep RoxKilly siovene SamVerschueren sclausen
heavymery tjvantoll tapas4java gitter-badger tsvetomir valera-rozuvan
heavymery tjvantoll tapas4java gitter-badger tsvetomir valera-rozuvan
vogloblinsky vincentpalita ghys Yalrafih arioth arnaudvalle
vogloblinsky vincentpalita ghys Yalrafih arioth arnaudvalle
billsworld blackheart01 butterfieldcons danielcrisp gforceg guilhebl
billsworld blackheart01 butterfieldcons danielcrisp gforceg guilhebl
jgolla omerfarukyilmaz pbazurin-softheme ZuSe rossedfort ruffiem
jgolla omerfarukyilmaz pbazurin-softheme ZuSe rossedfort ruffiem
savcha s-f-a-g ultrasonicsoft taguan
savcha s-f-a-g ultrasonicsoft taguan

License

MIT

angular-seed-advanced's People

Contributors

aboeglin avatar ashishmondal avatar daniru avatar eppsilon avatar gkalpak avatar hankehly avatar jakepartusch avatar jesperronn avatar joshwiens avatar jvitor83 avatar karlhaas avatar kiuka avatar ludohenin avatar m-abs avatar markwhitfeld avatar mgechev avatar nareshbhatia avatar natarajanmca11 avatar nathanwalker avatar netstart avatar nightapes avatar robstoll avatar ryzy avatar sasikumardr avatar sfabriece avatar shyam-chen avatar tarlepp avatar thedondope avatar troyanskiy avatar vyakymenko avatar

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  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  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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-seed-advanced's Issues

Adding Angular Material v2.0 or Ionic 2.0 to the Advanced Seed

for the past 3 months, I have spent hours, even full whole days doing hard core Mad Science trying to decide between .
-Xamarin - i am a senior .Net developer., my days are full of C#E, besides Xaml comes naturally
-Apache Cordova , with 3 years with Angular and built 3 enterprise apps, i now love my JavaScript and angular coding ... love it so much , so i wanted to hybrid with Cordova. unfortunately plug-in are a pain to work with and specially maintain consistency , besides Hybrid are not Native..
-React Native , well everybody was telling me to go this route

but none of the above 3 convinced me or my team.
until I saw the angular 2 advanced seed. by far the best contribution someone can do for all developers,

By creating this template you have truly opened the doors and designed a true path towards Angular 2.0 as well as started a revolution on how software applications will be from now on.

In my humble opinion , i think you will make it perfect by adding Ionic 2 or Angular Material 2 to the mix.
is that on you radar ?

ActionBar action items not working

Hey Nathan

I tried adding some action items to the home component as also demonstrated in the NativeScript docs (https://docs.nativescript.org/ApiReference/ui/action-bar/HOW-TO):

    <ActionBar title="Angular 2 Seed Advanced"> 
      <ActionBar.actionItems>
        <ActionItem text="right" ios.position="right"></ActionItem>
      </ActionBar.actionItems>
    </ActionBar>

However, I am getting an error:

EXCEPTION: Error: Uncaught (in promise): TypeError: view._inheritProperties is not a function. (In 'view._inheritProperties(this)', 'view._inheritProperties' is undefined)

I also had a look at the ActionBarUtil class and can set items like that, but I'd still prefer to just to it in the template and use existing bindings. Is this something particular with the way this seed works or shouldn't the sample code just work?

Thanks a lot!

require node module in renderer process

What configuration we need to change to be able to use file system for example on ipcRenderer in a component?

I have tried to use

 require('electron').ipcRenderer

but I have an error that say (launch with npm start)

 "XHR error (404 Not Found) loading http://localhost:5555/node_modules/electron.js"

Cannot find module 'angular2/platform/common'.

Hi,

Steps to reproduce and a minimal demo of the problem
From the last version ee0959dcc5943ce817568f8413f209cb32d258c1

npm install -g nativescript
npm install -g typescript

# restart from scratch :)
git clean -dfX 

npm i
npm start

Current behavior

Console :

$ npm start

> [email protected] start C:\repositories\angular2-seed-advanced
> gulp serve.dev --color

[08:19:49] Requiring external module ts-node/register
[08:20:05] Loading tasks folder C:\repositories\angular2-seed-advanced\tools\tasks\seed
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.assets.dev
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.assets.prod
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.bundles.app
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.bundles
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.docs
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.html_css
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.index.dev
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.index.prod
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.dev
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.e2e
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.prod
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.test
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.tools
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\check.versions
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\clean.all
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\clean.dev
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\clean.prod
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\clean.tools
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\copy.js.prod
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\css-lint
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\generate.manifest
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\karma.start
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\serve.coverage
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\serve.docs
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\server.prod
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\server.start
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\tslint
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\watch.dev
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\watch.e2e
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\watch.test
[08:20:05] Loading tasks folder C:\repositories\angular2-seed-advanced\tools\tasks\project
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.build
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.libs
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.package.linux
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.package.mac
[08:20:05] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.package.windows
[08:20:05] Using gulpfile C:\repositories\angular2-seed-advanced\gulpfile.ts
[08:20:05] Starting 'serve.dev'...
[08:20:05] Starting 'build.dev'...
[08:20:05] Starting 'clean.dev'...
[08:20:05] Deleted dist/dev
[08:20:05] Finished 'clean.dev' after 689 ms
[08:20:05] Starting 'tslint'...
[08:20:09] Finished 'tslint' after 3.97 s
[08:20:09] Starting 'css-lint'...
[08:20:11] Finished 'css-lint' after 1.69 s
[08:20:11] Starting 'build.assets.dev'...
[08:20:12] Finished 'build.assets.dev' after 836 ms
[08:20:12] Starting 'build.html_css'...
[08:20:13] Finished 'build.html_css' after 954 ms
[08:20:13] Starting 'build.js.dev'...
C:/repositories/angular2-seed-advanced/node_modules/angulartics2/src/core/angulartics2.d.ts(3,26): error TS2307: Cannot find module 'angular2/platform/common'.
[08:20:16] TypeScript: 1 semantic error
[08:20:16] TypeScript: emit succeeded (with errors)
[08:20:16] Finished 'build.js.dev' after 3.18 s
[08:20:16] Starting 'build.index.dev'...
[08:20:17] gulp-inject 5 files into index.html.
[08:20:17] gulp-inject 4 files into index.html.
[08:20:17] gulp-inject 1 files into index.html.
[08:20:17] Finished 'build.index.dev' after 909 ms
[08:20:17] Finished 'build.dev' after 12 s
[08:20:17] Starting 'server.start'...
[08:20:18] Finished 'server.start' after 859 ms
[08:20:18] Starting 'watch.dev'...
[08:20:19] Finished 'watch.dev' after 820 ms
[08:20:19] Finished 'serve.dev' after 14 s
[BS] Access URLs:
 --------------------------------------
       Local: http://localhost:5555/
    External: http://192.168.5.51:5555/
 --------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.5.51:3001
 --------------------------------------
[BS] Serving files from: dist/empty/

Chrome :

localhost/:104 Error: Error: XHR error (404 Not Found) loading http://localhost:5555/angular2/platform/common.js
        at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost:5555/node_modules/angular2/bundles/angular2-polyfills.js?1461910817345:830:30)
        at ZoneDelegate.invokeTask (http://localhost:5555/node_modules/angular2/bundles/angular2-polyfills.js?1461910817345:423:38)
        at Zone.runTask (http://localhost:5555/node_modules/angular2/bundles/angular2-polyfills.js?1461910817345:320:48)
        at XMLHttpRequest.ZoneTask.invoke (http://localhost:5555/node_modules/angular2/bundles/angular2-polyfills.js?1461910817345:490:34)
    Error loading http://localhost:5555/angular2/platform/common.js as "angular2/platform/common" from http://localhost:5555/node_modules/angulartics2/src/core/angulartics2.js "Report this error at https://github.com/NathanWalker/angular2-seed-advanced/issues"

Expected/desired behavior

No error 👍

Other information

Tests :

$ npm test

> [email protected] test C:\repositories\angular2-seed-advanced
> gulp test --color

[08:26:23] Requiring external module ts-node/register
[08:26:39] Loading tasks folder C:\repositories\angular2-seed-advanced\tools\tasks\seed
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.assets.dev
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.assets.prod
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.bundles.app
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.bundles
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.docs
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.html_css
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.index.dev
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.index.prod
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.dev
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.e2e
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.prod
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.test
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\build.js.tools
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\check.versions
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\clean.all
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\clean.dev
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\clean.prod
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\clean.tools
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\copy.js.prod
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\css-lint
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\generate.manifest
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\karma.start
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\serve.coverage
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\serve.docs
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\server.prod
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\server.start
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\tslint
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\watch.dev
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\watch.e2e
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\seed\watch.test
[08:26:39] Loading tasks folder C:\repositories\angular2-seed-advanced\tools\tasks\project
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.build
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.libs
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.package.linux
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.package.mac
[08:26:39] Registering task C:\repositories\angular2-seed-advanced\tools\tasks\project\desktop.package.windows
[08:26:39] Using gulpfile C:\repositories\angular2-seed-advanced\gulpfile.ts
[08:26:39] Starting 'test'...
[08:26:39] Starting 'build.test'...
[08:26:39] Starting 'clean.dev'...
[08:26:39] Deleted dist/dev
[08:26:39] Finished 'clean.dev' after 753 ms
[08:26:39] Starting 'tslint'...
[08:26:43] Finished 'tslint' after 4.01 s
[08:26:43] Starting 'build.assets.dev'...
[08:26:44] Finished 'build.assets.dev' after 921 ms
[08:26:44] Starting 'build.js.test'...
C:/repositories/angular2-seed-advanced/node_modules/angulartics2/src/core/angulartics2.d.ts(3,26): error TS2307: Cannot find module 'angular2/platform/common'.
[08:26:49] TypeScript: 1 semantic error
[08:26:49] TypeScript: emit succeeded (with errors)
[08:26:49] Finished 'build.js.test' after 5.08 s
[08:26:49] Starting 'build.index.dev'...
[08:26:50] gulp-inject 5 files into index.html.
[08:26:50] gulp-inject 4 files into index.html.
[08:26:50] gulp-inject 1 files into index.html.
[08:26:50] Finished 'build.index.dev' after 936 ms
[08:26:50] Finished 'build.test' after 12 s
[08:26:50] Starting 'karma.start'...

START:
29 04 2016 08:26:53.517:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
29 04 2016 08:26:53.523:INFO [launcher]: Starting browser PhantomJS
29 04 2016 08:26:53.544:INFO [launcher]: Starting browser Chrome
29 04 2016 08:26:54.894:INFO [Chrome 49.0.2623 (Windows 10 0.0.0)]: Connected on socket /#V6UDzzU9evGeegFGAAAA with id 43620295
29 04 2016 08:26:55.117:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on socket /#E11UG8YcDuVI6XizAAAB with id 17389462
29 04 2016 08:26:57.170:WARN [web-server]: 404: /base/node_modules/angular2/platform/common.js
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR: Error{stack: null, originalErr: Error{}, line: 821, sourceURL: 'http://localhost:9876/base/node_modules/systemjs/dist/system.src.js?e1a1843273d23ee5028aa25121066ce32fecdb29'}
29 04 2016 08:26:58.158:WARN [web-server]: 404: /base/node_modules/angular2/platform/common.js
ERROR: Error{originalErr: Error{}}

Finished in 0.084 secs / 0 secs

SUMMARY:
√ 0 tests completed

=============================== Coverage summary ===============================
Statements   : 100% ( 0/0 )
Branches     : 100% ( 0/0 )
Functions    : 100% ( 0/0 )
Lines        : 100% ( 0/0 )
================================================================================

=============================== Coverage summary ===============================
Statements   : 100% ( 0/0 )
Branches     : 100% ( 0/0 )
Functions    : 100% ( 0/0 )
Lines        : 100% ( 0/0 )
================================================================================
npm ERR! Test failed.  See above for more details.

Testing with build watch and karma causes double load

Thanks for the other fix - works great :)

I am doing TDD with the following setup

Debug - In two different shell windows
npm run build.test.watch # 1st window
npm run karma.start # 2nd window

Then I edit/create a spec file and save, I then get a karma double run

Firstly as the dist folder rebuilds then the watcher fires a karma runs which gives
SUMMARY:
✔ 0 tests completed

Make perfect sense as there is nothing in dist as everything was removed.

Then as dist builds it runs the tests again which is fine
SUMMARY:
✔ 6 tests completed
ℹ 68 tests skipped

It all works but is there a way to make it that the karma run only triggers once the dist build complete -or something like that?

Possible problem with Android builds

I'm just starting out with this stuff, so it's possible I made a mistake, however by following the guide in the readme of this seed, electron and most else of it works, but if I build an apk I get the following, whether I put it on my Nexus 5 running CM12 directly, or using android-sdk with nexus 5 and android 6.0 intel_x64 (I haven't tested others).

Just follow the instructions in the readme from a fresh git clone. I'm on arch linux 64, running testing repos and kernel 4.6rc3/4, but I think it's a code error. Typescript 1.8 from system, everything else latest.
Please let me know if you need anything else, but I've cloned the repo twice with the same results.
(for quick testing you can skip the npm install and go straight to "tns install".
I also noticed there was a recent commit affecting code with these lines.

screenshot_20160419-175354
screenshot_20160419-175405
screenshot_20160419-175409

Issue in isActive

PFA i am facing this issue whenever i am trying to search isActive as true

image

templateUrl and styleUrls - wrong linkage breaks production build

Hi, - first off love the project!

The original seed project uses linkages like this
templateUrl: './login.component.html',
styleUrls: ['./login.component.css'],

But the currect advanced one uses
templateUrl: './components/login/login.component.html',
styleUrls: ['./components/login/login.component.css']

when I think it should be as the original above.

This is also causing the production build to break as it causes the builder to then look for files like this:
C:\work\ng2-adv\dist\tmp\components\login\components\login\login.component.html

Or am I just doing it wrong?

Hello.js

Just a thought, but I think integrating Hello.js would be super cool.

I can only imagine such an advanced seed would be used for advanced projects with users and stuff, and Hello.js makes using social logins really easy. The rest would be up to the backend tech of course, but a well integrated, fully client side solution for logging with facebook, google etc in your seed would be awesome :)

Electron build (windows) not working

Steps to reproduce and a minimal demo of the problem

npm run build.desktop.windows or start.desktop.windows. The app seems to build, executable is in the folder, everything seems fine

What steps should we try in your demo to see the problem?
Launch the executable.

Current behavior
The app is stuck on "Loading..." and doesn't load at all.

Expected/desired behavior
Having angular components loading. Empty page for now.

bug(tools): ngrx error in production build

Exists in #master when executing npm run build.prod

node -v : v5.10.1
npm -v : 3.8.3

Unhandled rejection Error on instantiate for dist/tmp/app/frameworks/app.framework/index.js at file:///Users/d3viant0ne/Projects/d3viant0ne/angular2-seed-advanced/dist/tmp/app/frameworks/app.framework/index.js
    Loading dist/tmp/main.web.js
    Error: ENOENT: no such file or directory, open '/Users/d3viant0ne/Projects/d3viant0ne/angular2-seed-advanced/node_modules/@ngrx/package.json'
        at Error (native)
    Error loading /Users/d3viant0ne/Projects/d3viant0ne/angular2-seed-advanced/node_modules/@ngrx/package.json

I'll PR a fix as soon as I finish my coffee

Error while running protractor tests

Steps to reproduce and a minimal demo of the problem
npm run webdriver-update
npm run webdriver-start
npm run serve.e2e
npm run e2e

Current behavior

[23:33:01] I/direct - Using ChromeDriver directly...
[23:33:01] I/launcher - Running 1 instances of WebDriver
[23:33:02] E/launcher - Error: ReferenceError: Zone is not defined
    at Object.<anonymous> (/Users/jakepartusch/Documents/angular/angular2-seed-advanced/modules/@angular/core/testing/fake_async.ts:8:34)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/jakepartusch/Documents/angular/angular2-seed-advanced/modules/@angular/core/testing.ts:5:3)
    at Module._compile (module.js:541:32)
[23:33:02] E/launcher - Process exited with error code 100

Other information
Related?
angular/protractor#3181

Integrate ng-bootstrap

As requested, creating a separate ticket to track getting ng-bootstrap implemented in the seed project.

Adding Socket.IO to the Advanced Seed

I don't want to sound as if the Advanced Seed needs anything to be better, because is already a great blessing for us developer.

But, have you considered to include Socket.IO and can that works across multi platforms.

for example, on a CRM app, User A who is running the CRM on an IPhone, updates the "Customer Information" , and at the same time the information is also updated "Socket.IO Real time" for User B who is running the CRM on a windows 10 device and looking at the same "Customer Information" screen for the same customer.

Obviously if a third person User C comes after the update operation described above, Socket.IO will not be involved with User C, because this third user will update the screen from the database.

Testing Workflow

Hey Nathan

Just a quick question about what the intended workflow is for testing or test-driven development. Currently, I'm using the debug commands:

# Debug - In two different shell windows
npm run build.test.watch      # 1st window
npm run karma.start           # 2nd window

However, even when using iit or ddescribe to only run certain tests, the delay from save to the tests actually passing takes at least 30 seconds.

Is this workflow only meant for debugging or what is the intended usage here? Glad to hear your insight.

Andy

Standardize function name in log service

I'd like to propose a name change for the public method o() in the log service. It's the only one that is not named with a full word (like error, warn and info).

The output from the method shows up in the "Log" tab in Chrome developer tools. To keep things consistent, I'd recommend renaming the method to log().

If that's something you're interested in, I'd be happy to do a PR updating the service and the usages of it in the seed project.

Where are the angular2-router implementation in this seed

I know you stated that questions should be asked at the angular2-seed repo, but angular2-seed-advanced has a different folder-structure and src than angular2-seed. I asked a question relevant to angular2-seed-advanced at http://stackoverflow.com/questions/36346227/angular2-failing-to-load-component-although-webstorm-resolves-it-correctly.

This issue relates to that question. In summary, I created and router. The icon of the router is displayed, but clicking the icon always results in a failure to resolve the component for the router. I use Webstrom and the component url resolves normally, but at runtime it does not resolves. So I am stuck.

Requesting your help please. It seems as if something else is missing. Thanks.

JSPM Support?

First off, thanks for the great seed and for staying on top of the moving target that is angular2.

This is really a question more than a feature request. I've been working on integrating this to my existing angular (and large) 1.x app, by adding in angular-upgrade, and switching from bower to jspm for package management. I'm just curious why you opted for the manual configuration of npm dependencies versus using JSPM or other.

The auto-config of systemjs that jspm generates has been really nice, but it's been a bit painful to get the bundling working due to the tmp folder used by the systemjs-builder and how to extricate just those files for jspm's use.

This is really for my own edification, so a satisfactory answer is "because it was easier", but I thought I would get any insights you have.

Workflow for mobile development

Hello there

First of all, thanks for this amazing project. I trying to find the best way to develop on iOS using the simulator.

I can run the app using:
npm run start.ios

However, live sync does not seem to work. I also tried running the following from the nativescript folder:
tns livesync ios --emulator --watch

After the usual typescript errors, it says "Compilation complete. Watching for file changes", but never updates when I change a file.

Am I missing something obvious here? Cheers

Both (npm run & gulp) docs commands no longer work.

Both (npm run & gulp) docs commands no longer work.

Output of gulp docs:

 jakeniemiec@computer  ~/RubymineProjects/asa2   master  gulp docs       
[11:44:43] Requiring external module ts-node/register
[11:44:45] Loading tasks folder /Users/jakeniemiec/RubymineProjects/asa2/tools/tasks/seed
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.assets.dev
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.assets.prod
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.bundles.app
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.bundles
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.docs
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.html_css
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.index.dev
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.index.prod
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.js.dev
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.js.e2e
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.js.prod
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.js.test
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/build.js.tools
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/check.versions
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/clean.all
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/clean.dev
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/clean.prod
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/clean.tools
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/copy.js.prod
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/css-lint
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/karma.start
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/serve.coverage
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/serve.docs
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/server.prod
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/server.start
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/tslint
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/watch.dev
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/watch.e2e
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/seed/watch.test
[11:44:45] Loading tasks folder /Users/jakeniemiec/RubymineProjects/asa2/tools/tasks/project
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/project/desktop.build
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/project/desktop.libs
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/project/desktop.package.linux
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/project/desktop.package.mac
[11:44:45] Registering task ~/RubymineProjects/asa2/tools/tasks/project/desktop.package.windows
[11:44:45] Using gulpfile ~/RubymineProjects/asa2/gulpfile.ts
[11:44:45] Starting 'docs'...
[11:44:45] Starting 'build.docs'...
[11:44:46] 
TypeDoc 0.3.12
Using TypeScript 1.6.2 from /Users/jakeniemiec/RubymineProjects/asa2/node_modules/typedoc/node_modules/typescript/lib

[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(100)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(101)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(102)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(103)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(104)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(105)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(137)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(138)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(139)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(140)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(141)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(142)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(553)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(554)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(555)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(556)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(557)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(558)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(709)
 '=' expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(992)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(993)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(994)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(995)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(996)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(997)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1199)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1200)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1201)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1202)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1203)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1204)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1324)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1325)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1326)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1327)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1328)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1329)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1516)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1517)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1518)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1519)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1520)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1521)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1548)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1549)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1550)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1551)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1552)
 Type expected.
[11:44:56] /Users/jakeniemiec/RubymineProjects/asa2/typings/main/ambient/github-electron/index.d.ts(1557)
 Type expected.
[11:44:56] 'build.docs' errored after 11 s
[11:44:56] Error in plugin 'gulp-typedoc'
Message:
    Failed to generate load TypeDoc project.
[11:44:56] 'docs' errored after 11 s
[11:44:56] Error in plugin 'run-sequence'
Message:
    An error occured in task 'build.docs'.

Organising template files in the same folder for all platforms

I did some code changes here to show the idea of the (feature?) request.

Having all the template files side by side for one component would feel way more natural for me (and also more in the spirit of this seed, as far as i understand it).

This currently fails on runtime (iOS) with:
Error: File app/components/app/app.component.xml does not exist.
(However, the file does exist at this location in the nativescript folder.)

chore(devDeps): Update dev dependencies

Major

  • stylelint-config-standard to 5.0.0
    • Removed: font-family-name-quotes, function-url-quotes and string-quotes rules

Minor

  • tslint to 3.7.1
    • Enhancements & new rules / rule options
  • stylelint to 5.3.0
    • Various rule fixes
    • SugarSS & Less syntax support
  • colorguard to 1.1.1
    • Upstream dependency updates

Patch

  • ts-node to 0.7.1
    • Fix for absolute paths
  • typings to 0.7.12
    • Improve deprecation and open messages
  • chalk to 1.1.3
    • Improve deprecation and open messages

Associated Fixes

  • Fixed style error in toolbar.component.css ( stylelint update )

Changed pages are not reloaded in Chrome, Canary or Firefox

Hi Nathan,
After changing a .ts, .html, etc, source in the advanced-seed project, I see the gulp task print the 'Reloading page...' in the console, but the page does not actually reload.

I think the problem lies with the seed dependency on LiveReload. I installed LiveReload 2.1.0, but clicking the icon in the browser attempting to enable it always result in

'Could not connect to LiveReload server. Please make sure that a compatible LiveReload server is running.'

Did you experience this in your test, and how did you overcome it? I see a lot of similar issues on the web about the compatibility of livereload. It is an issue for me now because currently I have to always do an 'npm start' to see my work-change and this does consume a lot of time.

Please let me know if you have an alternative to reload the pages.

Great seed Nathan. And thanks.

update to latest seed?

Hi,

Will you be updating this seed with all the latest changes done on the original seed?

Thanks :)

is moduleId: module.id a good or bad idea?

Hey I've just noticed you don't use moduleId: module.id at the top, is there a reason?

I've seen it allows referencing html and css files relatively:

@FormComponent({
  selector: 'sd-home',
  moduleId: module.id,
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css']
})

instead of:

@FormComponent({
  selector: 'sd-home',
  templateUrl: './components/home/home.component.html',
  styleUrls: ['./components/home/home.component.css']
})

Error in rxjs (Not found)

Why not a 'Shared' folder for common stuff

Looking at the files inside Client & NativeScript, there are a lot of duplicates.

Why not a Shared, or Library, or ?, as a location for all common shared files between the multiple targets?

Maybe that topic has been discussed already, and I'm coming late. Forgive me if that is the case.

Changing name of seed project

In 'How best to use for your project' I see 'Create a new framework for your application in src/frameworks to build your codebase out. Say your app is called AwesomeApp, then create awesomeapp.framework and start building out all your components and services in there. Create other frameworks as you see fit to organize.'

The name of this project is 'angular2-seed-advanced'.How do I change the name of the project to AwesomeApp and still retain the ability to update from your repo when future changes are made. Is there a special way to do this? Or I should just use the name of AwesomeApp in the framework identification?
I use Webstorm for my app development. Is there anything I have do do in Webstorm to allow it to compile the .ts files to the build.dev directory etc.

Thanks

Error in MultilingualService

I followed the instructions in the "How To Start" section and all went without error until I ran npm start.

During the build.js.dev Gulp task, the following error was emitted:
src/frameworks/i18n.framework/services/multilingual.service.ts(36,17): error TS2339: Property 'useStaticFilesLoader' does not exist on type 'TranslateService'.

npm-run-error

out-of-the-box @angular/core not found from @ngrx

Steps to reproduce and a minimal demo of the problem
Following the Getting Started guide.

  1. clone the angular2-seed-advanced repo
  2. npm install
  3. npm start

What steps should we try in your demo to see the problem?

  • Observe the following error in the build output during build.js.dev task
$ npm start

> [email protected] start /Users/lorenerickson/Source/cw/composer-web
> gulp serve.dev --color

[17:10:00] Requiring external module ts-node/register
[17:10:02] Loading tasks folder /Users/lorenerickson/Source/cw/composer-web/tools/tasks/seed
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.assets.dev
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.assets.prod
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.bundles.app
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.bundles
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.docs
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.html_css
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.index.dev
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.index.prod
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.js.dev
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.js.e2e
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.js.prod
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.js.test
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/build.js.tools
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/check.versions
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/clean.all
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/clean.dev
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/clean.prod
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/clean.tools
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/copy.js.prod
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/css-lint
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/generate.manifest
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/karma.start
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/serve.coverage
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/serve.docs
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/server.prod
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/server.start
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/tslint
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/watch.dev
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/watch.e2e
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/seed/watch.test
[17:10:02] Loading tasks folder /Users/lorenerickson/Source/cw/composer-web/tools/tasks/project
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/project/desktop.build
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/project/desktop.libs
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/project/desktop.package.linux
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/project/desktop.package.mac
[17:10:02] Registering task ~/Source/cw/composer-web/tools/tasks/project/desktop.package.windows
[17:10:02] Using gulpfile ~/Source/cw/composer-web/gulpfile.ts
[17:10:02] Starting 'serve.dev'...
[17:10:02] Starting 'build.dev'...
[17:10:02] Starting 'build.assets.dev'...
[17:10:03] Finished 'build.assets.dev' after 97 ms
[17:10:03] Starting 'build.html_css'...
[17:10:03] Finished 'build.html_css' after 443 ms
[17:10:03] Starting 'build.js.dev'...
/Users/lorenerickson/Source/cw/composer-web/node_modules/@ngrx/store/ng2.d.ts(1,39): error TS2307: Cannot find module '@angular/core'.
[17:10:06] TypeScript: 1 semantic error
[17:10:06] TypeScript: emit succeeded (with errors)
[17:10:06] Finished 'build.js.dev' after 3.35 s
[17:10:06] Starting 'build.index.dev'...
[17:10:06] gulp-inject 5 files into index.html.
[17:10:06] gulp-inject 4 files into index.html.
[17:10:06] gulp-inject 1 files into index.html.
[17:10:06] Finished 'build.index.dev' after 56 ms
[17:10:06] Finished 'build.dev' after 3.95 s
[17:10:06] Starting 'server.start'...
[17:10:06] Finished 'server.start' after 27 ms
[17:10:06] Starting 'watch.dev'...
[17:10:06] Finished 'watch.dev' after 52 ms
[17:10:06] Finished 'serve.dev' after 4.03 s
[BS] Access URLs:
 ---------------------------------------
       Local: http://localhost:5555/
    External: http://192.168.1.126:5555/
 ---------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.1.126:3001
 ---------------------------------------
[BS] Serving files from: dist/empty/
  • Observe correlating error in javascript console of browser running app
http://localhost:5555/node_modules/@angular/core.js Failed to load resource: the server responded with a status of 404 

Current behavior
Out of the box, with no other changes, I would expect the seed project to build and serve something. It doesn't.

Expected/desired behavior
Clone, build, serve. Show me something awesome.

Other information

Am I doing the pull/merge correctly?

I followed the suggestions on forking the seed, by downloading a zip version and configuring upstream/master. Did that a couple weeks ago and started working on my project.

Sed is awesome btw, thanks for the effort.

Then today, I did this to get my project to the latest seed:

git fetch upstream
git merge upstream/master

But now I have 100's of conflicts. It looks like the merge did not work as expected, following the suggested workflow!

In other projects I had simply forked it here and then used VSCode pull to do the fetch/merge and never had that many conflicts. (I'm also using mgechev's angular2-seed on another project).

So, am I doing something wrong?

Please help...

(ps: is there a gitter or any other chat channel for this seed?)

Record video explanations

  • explain test providers; why/how
  • explain how teams can setup reusable test scenarios
  • explain test shorthand

Electron / Nwjs support

Hi @NathanWalker,

This a wonderful effort. I really like the organization of the project. Any ideas when you are planning for the electron support? some hints on how it can be done would be appreciated. At least a gulp task to launch the app as it is on electron would be helpful.

[Feature Request] Add angular-universal to render server side

This is a fantastic seed project. Congratulations, I really appreciate your time.

I'm opening this to keep an open ticket for implementing angular universal in the project, this will make the full stack complete.

This is already a super excellent, well-thought structure, adding server side will make it even better.

Regards.

Webpacks support for web production deployment

This looks like a really great scaffold, but I don't see anything for web deployment, like webpacks or jpsm.

Are there any plans to implement this, or am I missing something?

Thanks for the great work!

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.