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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
didIClick: 'No Clicks!' | |
}); |
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.registry.add('css', { | |
toTree: function(tree, inputPath, outputPath, options) { | |
// broccoli-compass doesn't like leading slashes | |
if (inputPath[0] === '/') { inputPath = inputPath.slice(1); } | |
return compileCompass(tree, inputPath + '/app.scss', { | |
outputStyle: 'expanded', | |
require: 'sass-css-importer', // Allows us to import CSS files with @import("CSS:path") | |
sassDir: inputPath, | |
imagesDir: 'images', |
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
function randomDeck(player, n) { | |
var store = player.store; | |
var deck = player.get('deck'); | |
var r, promises = []; | |
return store.findAll('card') | |
.then(function(cards){ | |
var lastIndex = cards.get('length') - 1; | |
for(var i = 0; i < n; i++) { | |
r = randomInt(lastIndex); |
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
/* global require, module */ | |
var EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
var rework = require('broccoli-rework'); | |
var reworkTree = rework('app/styles', { use: function(css) { | |
var calc = require('rework-calc'); | |
var customMedia = require('rework-custom-media'); | |
var inliner = require('rework-npm'); | |
var vars = require('rework-vars'); |
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
test("Tour next, back, and cancel builtInButtons work", function(assert) { | |
assert.expect(6); | |
visit('/').then(function() { | |
assert.equal($('body.shepherd-active').length, 1, "Body gets class of shepherd-active, when shepherd becomes active"); | |
assert.equal($('.shepherd-enabled').length, 2, "attachTo element and tour get shepherd-enabled class"); | |
assert.equal($('#shepherdOverlay').length, 1, "#shepherdOverlay exists"); | |
click('.shepherd-enabled .next-button'); | |
//$("a:contains('Next'):visible")[0].click(); | |
assert.equal($("a:contains('Back'):visible").length, 1, "Ensure that the back button appears"); | |
click('.shepherd-enabled .back-button'); |
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 Ember from 'ember'; | |
const PositionalParams = {positionalParams: ["thing"]}; | |
export default Ember.Component.extend(PositionalParams, { | |
thing: "meow" | |
}); |
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 Ember from 'ember'; | |
export default Ember.Helper.helper(function () { | |
return "The title"; | |
}); |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
text: Ember.computed.alias('content.text') | |
}); |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
value: 1, | |
didReceiveAttrs() { | |
this._super(...arguments); | |
console.log(`didReceiveAttrs: get: ${this.get('value')} getAttr: ${this.getAttr('value')}`); | |
} |
OlderNewer