Skip to content

Commit

Permalink
* 4%, mini initial on dojo, AMD, typescript
Browse files Browse the repository at this point in the history
cats\commands\commander.js 65%
cats\ide.js 11%
cats\main.js 64%
  • Loading branch information
Eucaly committed Jan 23, 2015
1 parent 759ba0b commit 7d3c8a1
Show file tree
Hide file tree
Showing 18 changed files with 1,023 additions and 412 deletions.
182 changes: 182 additions & 0 deletions Jakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
// This file contains the build logic for CATS

var workerOptions = [
"resource/typings/lib.webworker.d.ts",

"src/typings/typescriptServices.d.ts",
"src/typings/cats.d.ts",
"src/cats/common.ts",
"src/tsworker/languageservicehost.ts",
"src/tsworker/scriptInfo.ts",
"src/tsworker/isense.ts",
"src/tsworker/modelCreator.ts"
];


var bzmOptions = [

"src/typings/cats.d.ts",
"src/typings/node-webkit.d.ts",
"src/typings/dojo/dojo.d.ts",

"src/cats/ide.ts",
"src/cats/main.ts"
];

var catsOptions = [

"resource/typings/lib.d.ts",

"src/typings/ace.d.ts",
"src/typings/cats.d.ts",
"src/typings/jsuml2.d.ts",
"src/typings/node-webkit.d.ts",
"src/typings/typescriptServices.d.ts",
"src/typings/qooxdoo.d.ts",

"src/cats/theme/color.ts",
"src/cats/theme/decoration.ts",
"src/cats/theme/font.ts",
"src/cats/theme/appearance.ts",
"src/cats/theme/theme.ts",

"src/cats/common.ts",
"src/cats/os.ts",
"src/cats/ide.ts",
"src/cats/projectSettings.ts",
"src/cats/tsWorkerProxy.ts",
"src/cats/project.ts",
"src/cats/refactor.ts",
"src/cats/editor.ts",
"src/cats/linter.ts",

"src/cats/commands/commander.ts",
"src/cats/commands/editorCommands.ts",
"src/cats/commands/fileCommands.ts",
"src/cats/commands/helpCommands.ts",
"src/cats/commands/ideCommands.ts",
"src/cats/commands/projectCommands.ts",

"src/cats/gui/editor/tsCompleter.ts",
"src/cats/gui/editor/autoCompletePopup.ts",
"src/cats/gui/editor/sourceEditor.ts",
"src/cats/gui/editor/imageEditor.ts",
"src/cats/gui/editor/umlEditor.ts",
"src/cats/gui/editor/tsTooltip.ts",
"src/cats/gui/editor/sourceEditorContextMenu.ts",
"src/cats/gui/editor/editSession.ts",

"src/cats/gui/console.ts",
"src/cats/gui/fileNavigator.ts",
"src/cats/gui/outlineNavigator.ts",
"src/cats/gui/resultTable.ts",
"src/cats/gui/tabView.ts",
"src/cats/gui/toolBar.ts",
"src/cats/gui/editorTabView.ts",
"src/cats/gui/statusBar.ts",
"src/cats/gui/confirmDialog.ts",
"src/cats/gui/promptDialog.ts",
"src/cats/gui/quickOpenDialog.ts",
"src/cats/gui/fileContextMenu.ts",
"src/cats/gui/configDialog.ts",
"src/cats/gui/projectSettingsDialog.ts",
"src/cats/gui/idePreferencesDialog.ts",
"src/cats/gui/processTable.ts",
"src/cats/gui/busyWindow.ts",
"src/cats/gui/propertyTable.ts",
"src/cats/gui/layout.ts",
"src/cats/gui/searchDialog.ts",
"src/cats/gui/renameDialog.ts",
"src/cats/gui/menubar.ts",
"src/cats/gui/tsHelper.ts",


"src/cats/util/mime.ts",
"src/cats/util/resourceLoader.ts",

"src/cats/main.ts"
];


/**
* Compiler task
*/
task('compile', {async:true}, function(outFile, options) {
if (outFile)
var cmd = "tsc --target ES5 --module AMD --outDir js " + options.join(" ") ;
else
var cmd = "tsc --target ES5 --module AMD --out " + outFile + " " + options.join(" ") ;

// console.log(cmd + "\n");
var ex = jake.createExec([cmd]);

// Add listeners for output and error
ex.addListener("stdout", function(output) {
process.stdout.write(output);
});
ex.addListener("stderr", function(error) {
process.stderr.write(error);
});
ex.addListener("cmdEnd", function() {
console.log("Done creating module " + outFile);
complete();
});
ex.addListener("error", function() {
console.error("Compilation of " + outFile + " had some errors");
});
ex.run();
});
var list = new jake.FileList();
list.include('src/cats/**/*.ts');

desc("Build the cats.nw distrubution file. Works only on OSX/Linux for now");
task('dist', {async: true}, function () {
var getNr = "`git log lib/*.js | grep '^commit ' | wc -l | tr -d ' '`";

var cmd = "zip -r ../cats-1.3." + getNr + ".nw lib/* resource/* node_modules/* CopyrightNotice.txt LICENSE.txt index.html package.json";

jake.exec([cmd], {printStdout: true}, function () {
console.log('Created cats distribution');
complete();
});
});


desc("Builds the main frontend for CATS");
file("lib/main.js" , catsOptions, {async:true}, function() {
jake.Task['compile'].invoke("lib/main.js", catsOptions);
});

desc("Builds the Web workers");
file("lib/tsworker.js" , workerOptions, {async:true}, function() {
jake.Task['compile'].invoke("lib/tsworker.js", workerOptions);
});

desc("Cleans the compiler output, declare files, and tests");
task("clean", function() {
jake.rmRf("lib/tsworker.js");
jake.rmRf("lib/main.js");
});

desc("Forced build the full CATS application");
task("build", [], function() {
jake.Task.clean.invoke();
jake.Task.default.invoke();
});

desc("Builds the full CATS application");
task("default2", [], function() {
jake.Task['lib/main.js'].invoke();
jake.Task['lib/tsworker.js'].invoke();
});

desc("Builds the main frontend for beZongMemo");
file("js/cats/main.js" , list.toArray(), {async:true}, function() {
jake.Task['compile'].invoke("", bzmOptions);
});

desc("test Builds the beZongMemo application");
task("default", [], function() {
jake.Task['js/cats/main.js'].invoke();
});

57 changes: 57 additions & 0 deletions bzm-dojo-amd-cats-progress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
| filename | qx | lines | dojo | lines | todo | 5 |
|--------------------------------------------|-----|-------|------|-------|------|-----|
| SUM | 209 | 7268 | 1 | 354 | | 4% |
| cats\commands\commander.js | 1 | 118 | | 110 | 6 | 65% |
| cats\commands\editorCommands.js | | | | | | |
| cats\commands\fileCommands.js | 0 | 129 | | | | |
| cats\commands\helpCommands.js | | | | | | |
| cats\commands\ideCommands.js | 1 | | | | | |
| cats\commands\projectCommands.js | | | | | | |
| cats\gui\editor\autoCompletePopup.js | 6 | | | | | |
| cats\gui\editor\editSession.js | | | | | | |
| cats\gui\editor\imageEditor.js | 3 | | | | | |
| cats\gui\editor\sourceEditor.js | 2 | | | | | |
| cats\gui\editor\sourceEditorContextMenu.js | 5 | | | | | |
| cats\gui\editor\tsCompleter.js | 1 | | | | | |
| cats\gui\editor\tsTooltip.js | | | | | | |
| cats\gui\editor\umlEditor.js | 3 | | | | | |
| cats\gui\busyWindow.js | 3 | | | | | |
| cats\gui\configDialog.js | 18 | | | | | |
| cats\gui\confirmDialog.js | 8 | | | | | |
| cats\gui\console.js | 4 | | | | | |
| cats\gui\editorTabView.js | 12 | | | | | |
| cats\gui\fileContextMenu.js | 9 | | | | | |
| cats\gui\fileNavigator.js | 5 | 167 | | | | |
| cats\gui\idePreferencesDialog.js | 1 | | | | | |
| cats\gui\layout.js | 6 | 88 | | | | |
| cats\gui\menubar.js | 1 | | | | | |
| cats\gui\outlineNavigator.js | 3 | | | | | |
| cats\gui\processTable.js | 10 | | | | | |
| cats\gui\projectSettingsDialog.js | 1 | | | | | |
| cats\gui\promptDialog.js | 9 | | | | | |
| cats\gui\propertyTable.js | 4 | | | | | |
| cats\gui\quickOpenDialog.js | 8 | | | | | |
| cats\gui\renameDialog.js | 9 | | | | | |
| cats\gui\resultTable.js | 8 | | | | | |
| cats\gui\searchDialog.js | 9 | | | | | |
| cats\gui\statusBar.js | 6 | | | | | |
| cats\gui\tabView.js | 10 | | | | | |
| cats\gui\toolBar.js | 5 | | | | | |
| cats\gui\tsHelper.js | | | | | | |
| cats\theme\appearance.js | 2 | | | | | |
| cats\theme\color.js | 4 | | | | | |
| cats\theme\decoration.js | 2 | | | | | |
| cats\theme\font.js | 2 | | | | | |
| cats\theme\theme.js | 8 | | | | | |
| cats\util\mime.js | | | | | | |
| cats\util\resourceLoader.js | | | | | | |
| cats\common.js | | | | | | |
| cats\editor.js | 2 | | | | | |
| cats\ide.js | 13 | 400 | | 149 | 20 | 11% |
| cats\linter.js | | | | | | |
| cats\main.js | 3 | 95 | 1 | 95 | 6 | 64% |
| cats\os.js | 1 | | | | | |
| cats\project.js | 1 | | | | | |
| cats\projectSettings.js | | | | | | |
| cats\refactor.js | | | | | | |
| cats\tsWorkerProxy.js | | | | | | |
59 changes: 0 additions & 59 deletions cats-bzm-dojo-port-progress.md

This file was deleted.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link rel="stylesheet" href="./dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="./css/jsdoc_original.css">
<link rel="stylesheet" href="./css/site_original.css">
<script src="./js/bootprefix.js"></script>
<script src="./src/bootprefix.js"></script>
<script src="./dojo/dojo/dojo.js"></script>
</head>
<body class="claro">
Expand Down
8 changes: 0 additions & 8 deletions js/bzm.js

This file was deleted.

57 changes: 0 additions & 57 deletions js/bzm/gui/editor/htmleditor.js

This file was deleted.

Loading

0 comments on commit 7d3c8a1

Please sign in to comment.