starting from the hello_world demo:
- we are gonna need the
to_string
method. but items from traits can only be used if the trait is in scope so we need to addValue
to ouruse
statement.
use neon::js::JsString;
function Mock (modules = ['ng', 'ngMock', 'campsite-ui']) { | |
this.injector = window.angular.injector(modules) | |
} | |
Mock.prototype.init = function (done) { | |
this.injector.invoke(($componentController) => { | |
this.$componentController = $componentController | |
// this.$DEPENDENCY = this.injector.get('$DEPENDENCY') |
var fs = require('fs') | |
var path = require('path') | |
var recursive = require('recursive-readdir') | |
recursive(path.join(__dirname, 'data'), function (err, files) { | |
if (err) return console.error(err) | |
files.forEach(function (file) { | |
fs.readFile(file, function (err, data) { | |
if (err) return console.error(err) | |
try { |
const html = require('choo/html') | |
const Nanocomponent = require('nanocomponent') | |
function CardForm () { | |
if (!(this instanceof CardForm)) return new CardForm() | |
this.error = '' | |
Nanocomponent.call(this) | |
} | |
CardForm.prototype = Object.create(Nanocomponent.prototype) |
module.exports = Emitter | |
function Emitter () { | |
if (!(this instanceof Emitter)) return new Emitter() | |
this._listeners = {} | |
} | |
Emitter.prototype.emit = function (eventName, data) { | |
const listeners = this._listeners[eventName] |
~/.ssh/keys
scp -i "campsite-geo.pem" bitbucket_rsa USERNAME@REMOTE-IP:/home/USERNAME/.ssh/keys/bitbucket_rsa
printf "Host bitbucket.org\n User git\n IdentityFile ~/.ssh/keys/bitbucket_rsa" >> ~/.ssh/config
chmod 700 ~/.ssh
chmod 600 ~/.ssh/keys/bitbucket_rsa
diff --recursive --unified --exclude test --exclude Makefile 3.0.0-beta-3/CHANGES.md 3.0.1/CHANGES.md | |
--- 3.0.0-beta-3/CHANGES.md 2016-09-21 12:03:36.000000000 -0400 | |
+++ 3.0.1/CHANGES.md 2016-11-08 17:27:02.000000000 -0500 | |
@@ -1,3 +1,63 @@ | |
+## v3.0.1 | |
+ | |
+* More API adjustments to align with native Promises | |
+ - Deprecated `promise.fulfilled(value)`, use `promise.Promise#resolve(value)` | |
+ - Deprecated `promise.rejected(reason)`, use `promise.Promise#reject(reason)` | |
+* When a `wait()` condition times out, the returned promise will now be |
// assumes the existence of a React component called `component` | |
const el = this.refs.sidebar.getDOMNode() | |
let startPos, startTransition | |
component.addEventListener('mousedown', startDragging) | |
component.addEventListener('touchstart', startDragging) | |
function getMousePosition (e) { | |
var pos = { |
export default function NgReduxStub() { | |
const ctrl = this | |
ctrl.selectedState = "" | |
ctrl.target = "" | |
ctrl.mapState = (state) => ({}) | |
ctrl.push = (selectedState) => { | |
if (!isPlainObject(selectedState)) { | |
throw 'selectedState must be a plain object' | |
} |
exportcsv.$inject = ['$sce'] | |
function exportcsv($sce) { | |
const defaultOptions = { | |
filename: 'export' | |
} | |
return { toCSV } |