Last active
October 22, 2015 18:45
-
-
Save freshcutdevelopment/5adca278b964b38a49fa to your computer and use it in GitHub Desktop.
Aurelia - Getting Started
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- app/app.html --> | |
<template> | |
<h1>${status}</h1> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app/app.js | |
import {getStatus} from 'status'; | |
getStatus(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app/app.js | |
export class App{ | |
constructor(){ | |
this.status = "Aurelia has been Bootstrapped"+ | |
"loading corresponding view for "+ | |
"this view-model.. looking for app.html"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var express = require('express'); | |
var app = express(); | |
app.use(express.static('app')); | |
app.get('/', function(req, res) { | |
res.sendfile('./app/test.html'); | |
}); | |
app.listen(5001); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var nodemon = require('gulp-nodemon'); | |
gulp.task('browser-sync', ['nodemon'], function() { | |
browserSync.init(null, { | |
proxy: "http://localhost:5001", | |
files: ["app/**/*.*"], | |
browser: "google chrome", | |
port: 7001, | |
}); | |
}); | |
gulp.task('nodemon', function () { | |
return nodemon({script: 'app.js'}) | |
.on('restart', function(){ | |
console.log("refreshing browser..."); | |
}); | |
}); | |
gulp.task('default', ['browser-sync'], function () { | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function getStatus(){ | |
console.log('JSPM set up correctly!'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- app/test.html --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<h1>test</h1> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- app/test.html --> | |
<!DOCTYPE html> | |
<html> | |
... | |
<body> | |
<h1>test</h1> | |
<script src="jspm_packages/system.js"></script> | |
<script src="config.js"></script> | |
<script> | |
System.import('app'); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- app/test.html --> | |
<!DOCTYPE html> | |
<html> | |
... | |
<body> | |
... | |
<script src="jspm_packages/system.js"></script> | |
<script src="config.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- app/test.html --> | |
<!DOCTYPE html> | |
<html> | |
... | |
<body> | |
<h1>Status - Page</h1> | |
<div class="jumbotron"> | |
<div aurelia-app> | |
</div> | |
</div> | |
<script src="jspm_packages/system.js"></script> | |
<script src="config.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment