Skip to content

Instantly share code, notes, and snippets.

View toranb's full-sized avatar

Toran Billups toranb

View GitHub Profile
@toranb
toranb / step4-package.json
Created April 11, 2014 03:58
added grunt-es6-module-transpiler to the package.json file
{
"dependencies": {
"bower": "*",
"grunt": "*",
"grunt-cli": "*",
"grunt-contrib-concat": "*",
"grunt-es6-module-transpiler": "*",
"grunt-ember-template-compiler": "1.5.0"
},
"scripts": {
@toranb
toranb / step4-concat.js
Created April 11, 2014 04:11
updated concat for ES6
concat: {
dist: {
src: [
'js/vendor/jquery/jquery.min.js',
'js/vendor/handlebars/handlebars.js',
'js/vendor/ember/ember.min.js',
'js/lib/loader.js',
'js/lib/ember-resolver.js',
'js/dist/transpiled/app/**/*.js',
'js/dist/tmpl.min.js'],
@toranb
toranb / step4-router
Created April 11, 2014 04:15
router.js file for step 4
var Router = Ember.Router.extend();
Router.map(function() {
this.resource("people", { path: "/" });
});
export default Router;
@toranb
toranb / step4-person.js
Created April 11, 2014 04:17
step4 person.js file
var Person = Ember.Object.extend();
Person.reopenClass({
people: [],
find: function() {
var first = Person.create({name: 'toran'});
var last = Person.create({name: 'matt'});
this.people.pushObject(first);
this.people.pushObject(last);
return this.people;
@toranb
toranb / step4-people-route.js
Last active August 29, 2015 13:59
people route
import Person from 'example/models/person';
var PeopleRoute = Ember.Route.extend({
model: function() {
return Person.find();
}
});
export default PeopleRoute;
@toranb
toranb / step4-app.js
Last active August 29, 2015 13:59
updated app.js for step 4
import Resolver from 'ember/resolver';
var App = Ember.Application.extend({
modulePrefix: 'example',
Resolver: Resolver['default']
});
export default App;
@toranb
toranb / step4-index.html
Last active August 29, 2015 13:59
need to boot the app now that we are using ES6
<!DOCTYPE html>
<html>
<head><title>example app</title></head>
<body>
<script src='js/dist/deps.min.js'></script>
<script>
window.App = require('example/app')["default"].create();
</script>
</body>
</html>
@toranb
toranb / step5-package.json
Created April 12, 2014 15:27
now added jshint
{
"dependencies": {
"bower": "*",
"grunt": "*",
"grunt-cli": "*",
"grunt-contrib-jshint": "*",
"grunt-contrib-concat": "*",
"grunt-es6-module-transpiler": "*",
"grunt-ember-template-compiler": "1.5.0"
},
@toranb
toranb / step5-Gruntfile.js
Last active August 29, 2015 13:59
add grunt-contrib-jshint
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.initConfig({
jshint: {
all: ['js/app/**/*.js'],
options : {
esnext : true
}
}
@toranb
toranb / step6-package.json
Created April 12, 2014 18:54
added grunt-contrib-watch
{
"dependencies": {
"bower": "*",
"grunt": "*",
"grunt-cli": "*",
"grunt-contrib-watch": "*",
"grunt-contrib-jshint": "*",
"grunt-contrib-concat": "*",
"grunt-es6-module-transpiler": "*",
"grunt-ember-template-compiler": "1.5.0"