From 0b57ad5ebdec1586137a0a89bd54a44e78ea43a8 Mon Sep 17 00:00:00 2001 From: mgechev Date: Sat, 21 Mar 2015 16:38:08 -0700 Subject: [PATCH] Initial commit --- .gitignore | 32 ++++++++++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ gulpfile.js | 38 ++++++++++++++++++++++++++++++++++++++ index.html | 26 ++++++++++++++++++++++++++ js/app.js | 5 +++++ package.json | 22 ++++++++++++++++++++++ 6 files changed, 144 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 gulpfile.js create mode 100644 index.html create mode 100644 js/app.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0eb132d --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Commenting this out is preferred by some people, see +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Users Environment Variables +.lock-wscript + +dist +dev +lib diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..51ae5dc --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Minko Gechev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..4c1cde2 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,38 @@ +'use strict'; + +var gulp = require('gulp'); +var shell = require('gulp-shell'); +var traceur = require('gulp-traceur'); +var NG_PATH = './node_modules/angular2/es6/dev/'; +var RTT_PATH = './node_modules/rtts_assert/'; + +gulp.task('build:ng', shell.task([ + 'npm install', + './es5build.js -d ../../../../lib/angular' + ], { + cwd: NG_PATH + }) +); + +gulp.task('build:rtts', shell.task([ + 'npm install', + './es6/es5build.js -d ./../../lib/rtts_assert' + ], { + cwd: RTT_PATH + }) +); + +gulp.task('build:angular', ['build:ng', 'build:rtts']); + +gulp.task('build', function () { + return gulp.src('./js/**/*.js') + .pipe(traceur({ + sourceMaps: 'inline', + modules: 'instantiate' + })) + .pipe(gulp.dest('./dev')); +}); + +gulp.task('watch', function () { + gulp.watch('./js/**', ['build']); +}); diff --git a/index.html b/index.html new file mode 100644 index 0000000..66dbfc6 --- /dev/null +++ b/index.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/app.js b/js/app.js new file mode 100644 index 0000000..b1bcd09 --- /dev/null +++ b/js/app.js @@ -0,0 +1,5 @@ +import {Component, Template, bootstrap, Foreach} from 'angular2/angular2'; + +export default () => { + alert('It works!'); +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..1eb88c2 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "ng2hn", + "version": "0.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Minko Gechev ", + "license": "MIT", + "devDependencies": { + "gulp": "^3.8.11", + "gulp-shell": "^0.4.0", + "gulp-traceur": "^0.17.0" + }, + "dependencies": { + "angular2": "2.0.0-alpha.13", + "es6-module-loader": "^0.15.0", + "rtts_assert": "^2.0.0-alpha.11", + "systemjs": "^0.15.0" + } +}