In this guide we will cover two main cases:
- Ember specific library
- vendor library
The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.
module.exports = function denodify(fn) { | |
return function() { | |
var self = this; | |
var args = Array.prototype.slice.call(arguments); | |
return new Promise(function(resolve, reject) { | |
args.push(function(error, result) { | |
error ? reject(error) : resolve(result); | |
}); |
import Foundation | |
public func getASTString() -> String { | |
// get the file path for the file "test.json" in the playground bundle | |
// let filePath = NSBundle.mainBundle().pathForResource("FirstTtest", ofType: "ast") | |
// get the contentData | |
let contentData = NSFileManager.defaultManager().contentsAtPath("a.txt") | |
### | |
Module dependencies | |
### | |
require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
express = require 'express' | |
app = module.exports = express.createServer() | |
RedisStore = require 'connect-redis' |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mysql | |
spec: | |
ports: | |
- port: 3306 | |
nodePort: 30306 | |
selector: |
import React, { Component } from 'react' | |
import Subapp from './subapp/Root' | |
class BigApp extends Component { | |
render() { | |
return ( | |
<div> | |
<Subapp /> | |
<Subapp /> | |
<Subapp /> |
const composedCreateStore = compose( | |
applyMiddleware( | |
thunkMiddleware, | |
dispatchIdMiddleware, | |
webWorkerMiddleware('/build/worker.js'), | |
() => promiseMiddleware, | |
loggerMiddleware | |
), | |
createStore | |
); |
After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.
I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.
When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on:
// Usage: | |
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread | |
// then use as follows: | |
// | |
// query(term | [term, term, ...], term | [term, term, ...], ...) | |
// | |
// When arguments are in an array then that means an "or" and when they are seperate that means "and" | |
// | |
// Term is of the format: | |
// ((-)text/RegExp) ( '-' means negation ) |