Skip to content

Instantly share code, notes, and snippets.

View erlimar's full-sized avatar

Erlimar Silva Campos erlimar

View GitHub Profile
@erlimar
erlimar / es5-class.js
Last active February 7, 2017 22:54
sample/ecma-script
// Copyright (c) E5R Development Team. All rights reserved.
// Licensed under the Apache License, Version 2.0. More license information in LICENSE.txt.
/**
* Fake jQuery Library
*/
var module; +function (exports) {
"use strict"
var document = exports.document || { querySelectorAll: function () { return [] } };
python -c "import sys; exit(0 if sys.version_info.major == 3 else 9999)"
IF %ERRORLEVEL% NEQ 0 (
echo O Python 3 nao esta instalado
goto :error
)
where python 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
echo O Python nao esta instalado
goto :error
)
var gulp = require('gulp'),
tsc = require('gulp-typescript');
gulp.task('copy-libs', function() {
gulp
.src([
'node_modules/traceur/bin/traceur-runtime.js',
'node_modules/systemjs/dist/system.js',
'node_modules/angular2/bundles/angular2.js'
])
gulp.task('copy-libs', function() {
gulp
.src([
'node_modules/traceur/bin/traceur-runtime.js',
'node_modules/systemjs/dist/system.js',
'node_modules/angular2/bundles/angular2.js'
])
.pipe(gulp.dest('./lib'));
});
C:\introduction-angular2> npm install systemjs@0.19.3 --save
C:\introduction-angular2> npm install traceur@0.0.91 --save
C:\introduction-angular2> npm install angular2@2.0.0-alpha.37 --save
<html>
<head>
<title>Angular 2 Quickstart</title>
</head>
<body>
<!-- The app component created in app.ts -->
<my-app></my-app>
<script>import * from 'app';</script>
</body>
</html>
<html>
<head>
<title>Angular 2 Quickstart</title>
<script src="lib/traceur-runtime.js"></script>
<script src="lib/system.js"></script>
<script>System.config({defaultJSExtensions: true});</script>
<script src="lib/angular2.js"></script>
</head>
<body>
<!-- The app component created in app.ts -->
<script src="lib/system.js"></script>
<script>System.config({defaultJSExtensions: true});</script>
...
<!--After <my-app></my-app>-->
<script>System.import('app');</script>
<script src="https://jspm.io/system@0.16.js"></script>
...
<!--After <my-app></my-app>-->
<script>System.import('app');</script>