From afa761646472120edef1f9b01f219f125f20128e Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Thu, 18 Sep 2014 14:56:38 -0700 Subject: [PATCH] build - refactor --- .gitignore | 4 + .gitmodules | 9 ++ TODO.md | 9 ++ gulpfile.js | 138 +++++++++++++++++++++++++++ modules/examples/src/todo/app.es6d | 17 ++++ modules/examples/src/todo/dom.dart | 18 ++++ modules/examples/src/todo/dom.es6 | 14 +++ modules/examples/src/todo/index.html | 20 ++++ modules/examples/src/todo/main.dart | 5 + package.json | 25 +++++ postinstall.sh | 12 +++ pubspec.yaml | 10 ++ tools/js2dart | 1 + tools/rtts-assert | 1 + tools/traceur | 1 + 15 files changed, 284 insertions(+) create mode 100644 .gitmodules create mode 100644 TODO.md create mode 100644 gulpfile.js create mode 100644 modules/examples/src/todo/app.es6d create mode 100644 modules/examples/src/todo/dom.dart create mode 100644 modules/examples/src/todo/dom.es6 create mode 100644 modules/examples/src/todo/index.html create mode 100644 modules/examples/src/todo/main.dart create mode 100644 package.json create mode 100755 postinstall.sh create mode 100644 pubspec.yaml create mode 160000 tools/js2dart create mode 160000 tools/rtts-assert create mode 160000 tools/traceur diff --git a/.gitignore b/.gitignore index 2ceb8eed93..9b635235de 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,10 @@ build/ packages/ .buildlog +node_modules +packages + +.DS_STORE # Or the files created by dart2js. *.dart.js diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..0da44a23f6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "tools/js2dart"] + path = tools/js2dart + url = git@github.com:angular/js2dart.git +[submodule "tools/rtts-assert"] + path = tools/rtts-assert + url = git@github.com:angular/assert.git +[submodule "tools/traceur"] + path = tools/traceur + url = git@github.com:google/traceur-compiler.git diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000000..3334c11d0d --- /dev/null +++ b/TODO.md @@ -0,0 +1,9 @@ +## Setup +- use package.json's out of the individual projects + +- auto start Chromium when start serving +- auto refresh Chromium when s/t changed +- transform index.html: + -> use a template with flags for dart/js and a variable with all files + -> remove all + <% } else { %> + + + + + + <% } %> + + \ No newline at end of file diff --git a/modules/examples/src/todo/main.dart b/modules/examples/src/todo/main.dart new file mode 100644 index 0000000000..614239e433 --- /dev/null +++ b/modules/examples/src/todo/main.dart @@ -0,0 +1,5 @@ +import 'app.dart' show App; + +main() { + new App().run(); +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000000..082de0ffc2 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "angular", + "version": "0.0.0", + "description": "Angular", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "postinstall": "./postinstall.sh" + }, + "author": "Tobias Bosch ", + "license": "MIT", + "dependencies": { + "gulp": "^3.8.8", + "gulp-rename": "^1.2.0", + "gulp-shell": "^0.2.9", + "gulp-watch": "^1.0.3", + "q": "^1.0.1", + "through2": "^0.6.1", + "event-stream": "^3.1.5", + "gulp-connect": "~1.0.5", + "gulp-rimraf": "^0.1.0", + "run-sequence": "^0.3.6", + "glob": "^4.0.6", + "gulp-ejs": "^0.3.1" + } +} diff --git a/postinstall.sh b/postinstall.sh new file mode 100755 index 0000000000..0a8d34e8e7 --- /dev/null +++ b/postinstall.sh @@ -0,0 +1,12 @@ +#! /bin/sh +rm node_modules/traceur +ln -s ../tools/traceur node_modules/traceur + +rm node_modules/js2dart +ln -s ../tools/j2dart node_modules/js2dart + +cd tools/traceur +npm install + +cd ../js2dart +npm install \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000000..6cedec6afc --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,10 @@ +name: angular +version: 0.0.0 +authors: +- Vojta Jina +description: Compile JavaScript to Dart so that you can compile it back to JavaScript and run. +environment: + sdk: '>=1.4.0' +dependencies: +dev_dependencies: + unittest: '>=0.10.1 <0.12.0' diff --git a/tools/js2dart b/tools/js2dart new file mode 160000 index 0000000000..4e1ebfdefd --- /dev/null +++ b/tools/js2dart @@ -0,0 +1 @@ +Subproject commit 4e1ebfdefda333354bbda71e172daa5db4808616 diff --git a/tools/rtts-assert b/tools/rtts-assert new file mode 160000 index 0000000000..6caafd2561 --- /dev/null +++ b/tools/rtts-assert @@ -0,0 +1 @@ +Subproject commit 6caafd2561ece8cbfdabbe7357b50ce9192db18c diff --git a/tools/traceur b/tools/traceur new file mode 160000 index 0000000000..573ac4091b --- /dev/null +++ b/tools/traceur @@ -0,0 +1 @@ +Subproject commit 573ac4091b79167532ef929993e82fda96325718