Skip to content

Commit

Permalink
Add more reference paths and hijack compileTS to compile each ts file…
Browse files Browse the repository at this point in the history
… individually
  • Loading branch information
gashcrumb committed Nov 14, 2013
1 parent 3a372ff commit fa013f7
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 7 deletions.
41 changes: 37 additions & 4 deletions hawtio-web/compileTS
@@ -1,7 +1,40 @@
#!/bin/sh
echo "Compiling the typescript code in a watch loop so we recompile on source changes"
echo
#!/bin/bash
#echo "Compiling the typescript code in a watch loop so we recompile on source changes"
#echo
#
# TODO does not seem to like the --sourcemap command line option here! :(
#
tsc --watch --out src/main/webapp/js/app.js src/main/d.ts/* src/main/webapp/app/*/js/*.ts
#tsc --watch --out src/main/webapp/js/app.js src/main/d.ts/* src/main/webapp/app/*/js/*.ts

on_die()
{
# print message
#
echo "Dying..."
keepRunning = 0;

# Need to exit the script explicitly when done.
# Otherwise the script would live on, until system
# realy goes down, and KILL signals are send.
#
exit 0
}


# Execute function on_die() receiving TERM signal
#
trap 'on_die' TERM

keepRunning=1;

tsFiles=$(find . -type f -name *.ts | grep -v [.]d[.]ts | grep -v test | grep -v target)

for each in $tsFiles
do
echo "Compiling $each"
tsc --sourcemap --target es5 "$each"
if [ $keepRunning -a $? -ne 0 ]
then
exit 0
fi
done
1 change: 1 addition & 0 deletions hawtio-web/src/main/webapp/app/core/js/corePlugin.ts
Expand Up @@ -7,6 +7,7 @@
/// <reference path='gridStyleDirective.ts'/>
/// <reference path='folder.ts'/>
/// <reference path='helpers.ts'/>
/// <reference path='dialog.ts'/>
/// <reference path='../../jmx/js/jmxPlugin.ts'/>


Expand Down
4 changes: 3 additions & 1 deletion hawtio-web/src/main/webapp/app/git/js/git.ts
@@ -1,3 +1,5 @@
/// <reference path='../../core/js/corePlugin.ts'/>

module Git {

/**
Expand Down Expand Up @@ -185,4 +187,4 @@ module Git {
return this.localStorage["gitUserEmail"] || "anonymous@gmail.com";
}
}
}
}
1 change: 1 addition & 0 deletions hawtio-web/src/main/webapp/app/jmx/js/attribute.ts
@@ -1,3 +1,4 @@
/// <reference path='jmxPlugin.ts'/>
module Jmx {

export function AttributeController($scope, jolokia) {
Expand Down
1 change: 1 addition & 0 deletions hawtio-web/src/main/webapp/app/jmx/js/attributes.ts
@@ -1,3 +1,4 @@
/// <reference path='jmxPlugin.ts'/>
module Jmx {

export var propertiesColumnDefs = [
Expand Down
1 change: 1 addition & 0 deletions hawtio-web/src/main/webapp/app/jmx/js/attributesOld.ts
@@ -1,3 +1,4 @@
/// <reference path='jmxPlugin.ts'/>
module Jmx {

export function AttributesOldController($scope, $routeParams, workspace:Workspace, $rootScope) {
Expand Down
1 change: 1 addition & 0 deletions hawtio-web/src/main/webapp/app/jmx/js/chartEdit.ts
@@ -1,3 +1,4 @@
/// <reference path='jmxPlugin.ts'/>
module Jmx {
export function ChartEditController($scope, $location, workspace:Workspace, jolokia) {
$scope.selectedAttributes = [];
Expand Down
1 change: 1 addition & 0 deletions hawtio-web/src/main/webapp/app/jmx/js/donutChart.ts
@@ -1,3 +1,4 @@
/// <reference path='jmxPlugin.ts'/>
module Jmx {

export function DonutChartController($scope, $routeParams, jolokia, $templateCache) {
Expand Down
1 change: 1 addition & 0 deletions hawtio-web/src/main/webapp/app/source/js/helpers.ts
@@ -1,3 +1,4 @@
/// <reference path='sourcePlugin.ts'/>
module Source {

export var log:Logging.Logger = Logger.get("Source");
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/source/js/index.ts
@@ -1,4 +1,4 @@

/// <reference path='sourcePlugin.ts'/>
module Source {

export function IndexController($scope, $location, $routeParams, workspace:Workspace, jolokia) {
Expand Down
3 changes: 2 additions & 1 deletion hawtio-web/src/main/webapp/app/source/js/javadoc.ts
@@ -1,3 +1,4 @@
/// <reference path='sourcePlugin.ts'/>
module Source {

export function JavaDocController($scope, $location, $routeParams, workspace:Workspace, fileExtensionTypeRegistry, jolokia) {
Expand Down Expand Up @@ -45,4 +46,4 @@ module Source {
}
}
}
}
}
1 change: 1 addition & 0 deletions hawtio-web/src/main/webapp/app/source/js/source.ts
@@ -1,3 +1,4 @@
/// <reference path='sourcePlugin.ts'/>

module Source {

Expand Down
4 changes: 4 additions & 0 deletions hawtio-web/src/main/webapp/app/source/js/sourcePlugin.ts
@@ -1,3 +1,7 @@
/// <reference path='../../core/js/corePlugin.ts'/>
/// <reference path='../../wiki/js/wikiPlugin.ts'/>
/// <reference path='helpers.ts'/>

module Source {
var pluginName = 'source';
angular.module(pluginName, ['bootstrap', 'ngResource', 'hawtioCore', 'wiki']).
Expand Down
2 changes: 2 additions & 0 deletions hawtio-web/src/main/webapp/app/tree/js/treePlugin.ts
@@ -1,3 +1,5 @@
/// <reference path='../../core/js/corePlugin.ts'/>

module Tree {
var pluginName = 'tree';
angular.module(pluginName, ['bootstrap', 'ngResource', 'hawtioCore']).
Expand Down
5 changes: 5 additions & 0 deletions hawtio-web/src/main/webapp/app/wiki/js/wikiPlugin.ts
@@ -1,3 +1,8 @@
/// <reference path='../../core/js/corePlugin.ts'/>
/// <reference path='../../git/js/helpers.ts'/>
/// <reference path='helpers.ts'/>
/// <reference path='wikiRepository.ts'/>

module Wiki {

var pluginName = 'wiki';
Expand Down

0 comments on commit fa013f7

Please sign in to comment.