Roadmap to Ember Engines 1.0.0
-
Lazy loading for route-less Engines - Lazy loading of components and not just routes.
#!/bin/sh | |
URL_BASE="https://my.example.com" | |
basename="web-app" | |
for js in dist/assets/*.map; do | |
# $js has the full path. Chop it down to just the file name. | |
filename=$(basename ${js}) | |
# Production requires a little more work because of Ember CLI's fingerprinting. | |
# First, remove the ember-generated fingerprint and .js extension. This prefix is common between JS and MAP file. |
[T]he difference between a bad programmer and a | |
good one is whether he considers his code or his | |
data structures more important. Bad programmers | |
worry about the code. Good programmers worry about | |
data structures and their relationships. | |
-- Linus Torvalds | |
~~~ | |
Clarity and brevity sometimes are at odds. | |
When they are, I choose clarity. | |
-- Jacob Kaplan-Moss |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { | |
// no easing, no acceleration | |
linear: function (t) { return t }, | |
// accelerating from zero velocity | |
easeInQuad: function (t) { return t*t }, | |
// decelerating to zero velocity |
Roadmap to Ember Engines 1.0.0
Lazy loading for route-less Engines - Lazy loading of components and not just routes.
// install ember-cli-es6-transform | |
function importFromNPM(app,moduleName) { | |
let relPath = `node_modules/${moduleName}`; | |
let nodePath = `./${relPath}`; | |
let config = require(`${nodePath}/package.json`); | |
if (config.style) { | |
app.import(`${relPath}/${config.style}`); | |
} |
import Ember from 'ember'; | |
const { run: { debounce } } = Ember; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
runMe() { | |
console.log("I should be called once"); | |
}, | |
selectTime(item) { | |
meuArray.setEach('selected', false); // aqui tiro a classe de todos os itens | |
meuArray.findBy('id', item.id).set('selected', true); // aqui queria add só pro item clicado | |
} |