- Add router-printer.ts to you app
- Update your router.js to import it:
-import EmberRouter from '@ember/routing/router';
+import Router from './router-printer'
-export default class Router extends EmberRouter {
import { helper } from '@ember/component/helper'; | |
import { isDestroyed } from '@ember/destroyable'; | |
import { buildWaiter } from '@ember/test-waiters'; | |
const testWaiter = buildWaiter('debounce-helper'); | |
// WeakMap<Function, { timeoutId, asyncToken }>(); | |
const TIMERS = new WeakMap(); | |
function debounceHelper([context, action], { timeout }) { | |
return function(...args) { |
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to make opened Markdown files always be soft wrapped: | |
# | |
# path = require 'path' | |
# |
These are some things I've found helpful after doing React for a couple months. It's possible these practices are short sighted and will cause other problems, I just haven't hit those bumps in the road yet.
This list started after reading this phenomincal article on React Tips and Best Practicies.
Think of propTypes
as a love letter to whatever developer will work on a component after you. Your components should be as declarative as possible. React's error messaging is so clear and helpful and this will make things so much easier.
// MIXINS | |
vendor(prop, args) | |
-webkit-{prop} args | |
-moz-{prop} args | |
-o-{prop} args | |
{prop} args | |
animation() | |
vendor('animation', arguments) |
import Ember from 'ember'; | |
const { | |
get, | |
computed | |
} = Ember; | |
import InViewportMixin from 'ember-in-viewport'; | |
export default Ember.Component.extend( | |
InViewportMixin, |
There are several things to keep in mind when writing the stylesheet for the app:
#!/bin/bash | |
# Install Mongo | |
[[ ! `which mongod` ]] && | |
( | |
echo " --- Installing MongoDB" | |
sudo apt-key add /vagrant/10gen-gpg-key.asc | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
sudo apt-get update -qq | |
sudo apt-get install mongodb-10gen -y -qq |
$ imap-backup folders | |
***email*** | |
/home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/bin/imap-backup:68:in `block in <top (required)>': undefined method `each' for nil:NilClass (NoMethodError) | |
from /home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/lib/imap/backup/configuration/list.rb:25:in `block in each_connection' | |
from /home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/lib/imap/backup/configuration/list.rb:23:in `each' | |
from /home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/lib/imap/backup/configuration/list.rb:23:in `each_connection' | |
from /home/matt/.rvm/gems/ruby-1.9.3-p484/gems/imap-backup-1.0.3/bin/imap-backup:66:in `<top (required)>' | |
from /home/matt/.rvm/gems/ruby-1.9.3-p484/bin/imap-backup:23:in `load' | |
from /home/matt/.rvm/gems/ruby-1.9.3-p484/bin/imap-backup:23:in `<main>' | |
from /home/matt/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval' |