let BaseModel = DS.Model.extend({
type: DS.attr('string'),
});
BaseModel.reopenClass({
createModel(attrs) {
if (Ember.get(attrs, 'type') === 'foo') {
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 Handlebars = require('handlebars'); | |
module.exports = function(grunt) { | |
require('load-grunt-tasks')(grunt); | |
grunt.initConfig({ | |
yaml: { | |
docs: { | |
files: [{ | |
expand: true, |
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
{ | |
"title": "Lesson 2: Tasty Sandwiches", | |
"author": "jmeas", | |
"updatedAt": "2014-09-03T03:33:49Z", | |
"createdAt": "2014-09-02T20:11:40Z", | |
"public": true, | |
"pages": [ | |
{ | |
"pageName": "Some PageName", | |
"sections": [ |
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
/** | |
* React v0.12.2 | |
* | |
* Copyright 2013-2014, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* |
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
// Warning: | |
// super duper pseudo-code which won't work in any browser today. | |
class Component extends Element { | |
render() { | |
this.innerHTML = this.template(); | |
} | |
} | |
class MyComponent extends Component { |
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 default function ({Plugin, types: t}) { | |
return new Plugin('remove-comments', { | |
visitor: { | |
Program(node, parent, path, file) { | |
file.ast.comments = []; | |
}, | |
enter(node) { | |
node.leadingComments = null; | |
node.trailingComments = null; | |
} |
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
<h1>@thejameskyle</h1> |
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
import {src, dest, watch, parallel, series} from 'gulp'; | |
import lintPlugin from 'gulp-lint-plugin'; | |
import testPlugin from 'gulp-test-plugin'; | |
import buildPlugin from 'gulp-build-plugin'; | |
const SRC_DIRECTORY = './src'; | |
const TEST_DIRECTORY = './test'; | |
const DIST_DIRECTORY = './dist'; | |
const lintDir = dir => src(dir) |