Giter Club home page Giter Club logo

hottowel-angular-typescript's Introduction

Visual Studio Code Demo with Angular, TypeScript, Node, and HotTowel

As seen at //Build 2015 presented by Erich Gamma, Chris Dias and John Papa.

Prerequisites

  1. Install Node.js
  1. Install Yeoman npm install -g yo

  2. Install these NPM packages globally

    npm install -g bower gulp nodemon

    Refer to these instructions on how to not require sudo

hottowel-angular-typescript's People

Contributors

attilacsanyi avatar azureadvocatebit avatar dbaeumer avatar egamma avatar johnpapa avatar jsheely avatar timferrell 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

hottowel-angular-typescript's Issues

Issue with Lite-server

Hi,
I am new to angular2.I am facing lite-server failure. I installed it locally as well as globally but it doesn't seem to work. Attaching error I am getting. Please help.Thanks in advance!!
Issue_with_Lite-Server.txt

Task 'ts-compile' is not in your gulpfile

I am getting exception on > gulp dev-serve. Please help..

D:\projects\hottowel-typescript>gulp build
[16:28:07] Using gulpfile D:\projects\hottowel-typescript\gulpfile.js
[16:28:07] Task 'ts-compile' is not in your gulpfile
[16:28:07] Please check the documentation for proper gulpfile formatting

gulp test: "Unknown provider: routerHelperProvider <- routerHelper"

gulp test
[19:17:40] Using gulpfile /tmp/hottowel-angular-typescript/gulpfile.js
[19:17:40] Starting 'vet'...
[19:17:40] Analyzing source with TSLint, JSHint and JSCS
[19:17:41] Starting 'tsc-client'...
[19:17:41] Starting 'tsc-server'...
[19:17:41] Starting 'clean-code'...
[19:17:41] Cleaning: ./.tmp/**/*.js,./build/js/**/*.js,./build/**/*.html
[19:17:41] Finished 'clean-code' after 130 ms
[19:17:41] Starting 'templatecache'...
[19:17:41] Creating an AngularJS $templateCache
[19:17:42] Finished 'vet' after 1.96 s
[19:17:42] Finished 'templatecache' after 1.4 s
[19:17:49] Finished 'tsc-server' after 8.36 s
[19:17:50] Finished 'tsc-client' after 8.86 s
[19:17:50] Starting 'tsc'...
[19:17:50] Finished 'tsc' after 11 μs
[19:17:50] Starting 'test'...
WARN [config]: "/" is proxied, you should probably change urlRoot to avoid conflicts
WARN [watcher]: Pattern "/tmp/hottowel-angular-typescript/src/client/tests/server-integration/**/*.spec.js" does not match any file.
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Linux 0.0.0)]: Connected on socket 5ST1yhhBfKCGiqGZAM05 with id 57284513
PhantomJS 1.9.7 (Linux 0.0.0) layout sidebar "before each" hook FAILED
    Error: [$injector:unpr] Unknown provider: routerHelperProvider <- routerHelper
    http://errors.angularjs.org/1.3.17/$injector/unpr?p0=routerHelperProvider%20%3C-%20routerHelper
        at /tmp/hottowel-angular-typescript/bower_components/angular/angular.js:4031
        at getService (/tmp/hottowel-angular-typescript/bower_components/angular/angular.js:4178)
        at /tmp/hottowel-angular-typescript/bower_components/angular/angular.js:4036
        at getService (/tmp/hottowel-angular-typescript/bower_components/angular/angular.js:4178)
        at /tmp/hottowel-angular-typescript/bower_components/bardjs/dist/bard.js:301
        at forEach (/tmp/hottowel-angular-typescript/bower_components/angular/angular.js:326)
        at bardInject (/tmp/hottowel-angular-typescript/bower_components/bardjs/dist/bard.js:315)
        at /tmp/hottowel-angular-typescript/src/client/app/layout/sidebar.controller.spec.js:13
PhantomJS 1.9.7 (Linux 0.0.0): Executed 37 of 39 (1 FAILED) (0.463 secs / 0.066 secs)

=============================== Coverage summary ===============================
Statements   : 87.89% ( 341/388 )
Branches     : 50.76% ( 67/132 )
Functions    : 84.68% ( 105/124 )
Lines        : 88.48% ( 338/382 )
================================================================================
[19:17:54] Karma completed
[19:17:54] 'test' errored after 4.54 s
[19:17:54] Error: karma: tests failed with code 1
  at formatError (/home/yulia/.nvm/versions/v0.12.7/lib/node_modules/gulp/bin/gulp.js:169:10)
  at Gulp.<anonymous> (/home/yulia/.nvm/versions/v0.12.7/lib/node_modules/gulp/bin/gulp.js:195:15)
  at Gulp.emit (events.js:107:17)
  at Gulp.Orchestrator._emitTaskDone (/tmp/hottowel-angular-typescript/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
  at /tmp/hottowel-angular-typescript/node_modules/gulp/node_modules/orchestrator/index.js:275:23
  at finish (/tmp/hottowel-angular-typescript/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
  at cb (/tmp/hottowel-angular-typescript/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
  at karmaCompleted (/tmp/hottowel-angular-typescript/gulpfile.js:671:13)
  at removeAllListeners (/tmp/hottowel-angular-typescript/node_modules/karma/lib/server.js:215:7)
  at Server.<anonymous> (/tmp/hottowel-angular-typescript/node_modules/karma/lib/server.js:226:9)
  at Server.g (events.js:199:16)
  at Server.emit (events.js:129:20)
  at net.js:1419:10
  at process._tickCallback (node.js:355:11)

Doesn't support inheritance in the same namespace

Hi,

Does this sample supports classes inheritance in the same namespace?
For example, I've copied this project to my computer and:

  1. added a class ADataService which inherits from DataService. both are in the app.core namespace
  2. run the gulp task 'optimize'
  3. I see that the index.html references first the ADataService .js...and in the browser I get an error the cannot read property 'prototype' of undefined in the ADataService class definition

note that the page loads successfully.

Unknown provider: routerHelperProvider <- routerHelper

When I try this out-of-the-box, it runs okay, but this test fails:

[1APhantomJS 1.9.7 (Mac OS X 0.0.0) layout sidebar "before each" hook FAILED
    Error: [$injector:unpr] Unknown provider: routerHelperProvider <- routerHelper
    http://errors.angularjs.org/1.3.16/$injector/unpr?p0=routerHelperProvider%20%3C-%20routerHelper
        at ...project-path.../bower_components/angular/angular.js:4031
        at getService (...project-path.../bower_components/angular/angular.js:4178)
        at ...project-path.../bower_components/angular/angular.js:4036
        at getService (...project-path.../bower_components/angular/angular.js:4178)
        at ...project-path.../bower_components/bardjs/dist/bard.js:301
        at forEach (...project-path.../bower_components/angular/angular.js:326)
        at bardInject (...project-path.../bower_components/bardjs/dist/bard.js:315)
        at ...project-path.../src/client/app/layout/sidebar.controller.spec.js:13

If I comment out references to routerHelper in src/client/app/layout/sidebar.controller.spec.js, the tests pass fine. Is this method deprecated?

gulp build fails - "ReferenceError: Can't find variable: bard"

gulp build
[17:11:13] Using gulpfile ~/Dropbox/dev/playground/typescript/hottowel-angular-typescript/gulpfile.js
[17:11:13] Starting 'tsc-client'...
[17:11:13] Starting 'tsc-server'...
[17:11:13] Starting 'clean-styles'...
[17:11:13] Cleaning: ./.tmp/**/*.css,./build/styles/**/*.css
[17:11:13] Starting 'clean-code'...
[17:11:13] Cleaning: ./.tmp/**/*.js,./build/js/**/*.js,./build/**/*.html
[17:11:13] Starting 'vet'...
[17:11:13] Analyzing source with TSLint, JSHint and JSCS
[17:11:13] Starting 'clean-images'...
[17:11:13] Cleaning: ./build/images/**/*.*
[17:11:13] Starting 'clean-fonts'...
[17:11:13] Cleaning: ./build/fonts/**/*.*
[17:11:13] Finished 'clean-images' after 23 ms
[17:11:13] Starting 'images'...
[17:11:13] Compressing and copying images
[17:11:13] Finished 'clean-fonts' after 278 ms
[17:11:13] Starting 'fonts'...
[17:11:13] Copying fonts
[17:11:13] Finished 'clean-styles' after 808 ms
[17:11:13] Starting 'styles'...
[17:11:13] Compiling Less --> CSS
[17:11:14] Finished 'clean-code' after 1.24 s
[17:11:14] Starting 'templatecache'...
[17:11:14] Creating an AngularJS $templateCache
[17:11:15] Finished 'vet' after 1.9 s
[17:11:15] Finished 'styles' after 1.1 s
[17:11:15] Finished 'fonts' after 1.18 s
[17:11:15] Finished 'templatecache' after 781 ms
[17:11:15] Finished 'tsc-server' after 2.27 s
[17:11:15] Finished 'tsc-client' after 2.28 s
[17:11:15] Starting 'tsc'...
[17:11:15] Finished 'tsc' after 8.14 μs
[17:11:15] Starting 'wiredep'...
[17:11:15] Wiring the bower dependencies into the html
[17:11:15] Starting 'test'...
WARN [config]: "/" is proxied, you should probably change urlRoot to avoid conflicts
WARN [watcher]: Pattern "/Users/pk/Dropbox/dev/playground/typescript/hottowel-angular-typescript/src/client/tests/server-integration/**/*.spec.js" does not match any file.
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
[17:11:16] gulp-imagemin: Minified 4 images (saved 3.37 kB - 10.7%)
[17:11:16] Finished 'images' after 2.89 s
[17:11:16] gulp-inject 26 files into index.html.
[17:11:16] Finished 'wiredep' after 1.2 s
[17:11:16] Starting 'inject'...
[17:11:16] Wire up css into the html, after files are ready
[17:11:16] gulp-inject 1 files into index.html.
[17:11:16] Finished 'inject' after 8.96 ms
INFO [PhantomJS 1.9.7 (Mac OS X 0.0.0)]: Connected on socket hgbL8YVmAXH_AvWZZozo with id 35170509
PhantomJS 1.9.7 (Mac OS X 0.0.0) ERROR
  ReferenceError: Can't find variable: bard
  at /Users/pk/Dropbox/dev/playground/typescript/hottowel-angular-typescript/src/client/app/admin/admin.controller.spec.js:15


[17:11:18] Karma completed
[17:11:18] 'test' errored after 2.7 s
[17:11:18] Error: karma: tests failed with code 1
  at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
  at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
  at Gulp.emit (events.js:107:17)
  at Gulp.Orchestrator._emitTaskDone (/Users/pk/Dropbox/dev/playground/typescript/hottowel-angular-typescript/node_modules/gulp/node_modules/orchestrator/index.js:264:8)
  at /Users/pk/Dropbox/dev/playground/typescript/hottowel-angular-typescript/node_modules/gulp/node_modules/orchestrator/index.js:275:23
  at finish (/Users/pk/Dropbox/dev/playground/typescript/hottowel-angular-typescript/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
  at cb (/Users/pk/Dropbox/dev/playground/typescript/hottowel-angular-typescript/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
  at karmaCompleted (/Users/pk/Dropbox/dev/playground/typescript/hottowel-angular-typescript/gulpfile.js:671:13)
  at removeAllListeners (/Users/pk/Dropbox/dev/playground/typescript/hottowel-angular-typescript/node_modules/karma/lib/server.js:215:7)
  at Server.<anonymous> (/Users/pk/Dropbox/dev/playground/typescript/hottowel-angular-typescript/node_modules/karma/lib/server.js:226:9)
  at Server.g (events.js:199:16)
  at Server.emit (events.js:129:20)
  at net.js:1419:10
  at process._tickCallback (node.js:355:11)

Typo in index.html

I think you have a very strict dependency injection ... I see at least 6 i ;) attached to the html tag

Commonjs and Webpack

Do you think it is preferable to switch over to Commonjs module code generation in combination with Webpack?

The main benefit I see is that dependencies are tracked through explicit imports within the .ts-files instead of having to wire them up manually in index.html or the tsconfig-files section to maintain execution order. Additionally, Webpack reduces configuration complexity compared to the chaining of several gulp tasks and its system also incorporates the bundling of styles and vendor assets through explicit referencing from within .ts-files.

A major downside I feel is that in the Commonjs pattern you will need to add explicit references in every .ts-file you produce.

Phantom lib is not extracted.

I have tried this many times, but when this downloaded and extract, it's get hanged.

find detail below.

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-macosx.zip
Saving to /Applications/www/hottowel-angular-typescript/node_modules/phantomjs/phantomjs/phantomjs-1.9.7-macosx.zip
Receiving...
[======================================--] 95% 0.0s
Received 9186K total.
Extracting zip contents
Copying extracted folder /Applications/www/hottowel-angular-typescript/node_modules/phantomjs/phantomjs/phantomjs-1.9.7-macosx.zip-extract-1460549508833/phantomjs-1.9.7-macosx -> /Applications/www/hottowel-angular-typescript/node_modules/phantomjs/lib/phantom

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.