Skip to content

Instantly share code, notes, and snippets.

'use strict'
var Stream = require('stream')
var test = require('tape')
var browserify = require('browserify')
var through = require('through2')
/**
* This plugin waits until browserify is done going through the require tree,
* then adds "SUCCESS!" to the array passed in as `results` in the options object
@shawninder
shawninder / index.js
Created April 15, 2016 15:22
requirebin sketch
var browserify = require('browserify')
'use strict'
var Stream = require('stream')
var test = require('tape')
var browserify = require('browserify')
/**
* This plugin waits until browserify is done going through the require tree,
* then adds "SUCCESS!" to the array passed in as `results` in the options object
*/
@shawninder
shawninder / index.js
Last active April 15, 2016 09:06
requirebin sketch
var postcss = require('postcss')
var cssnext = require('postcss-cssnext')
var test = require('tape')
var input = 'body { color: rebeccapurple; }'
var expected = 'body { color: rgb(102, 51, 153); }'
test('cssnext', function (t) {
t.plan(1)
postcss([cssnext]).process(input).then(function (result) {
$ appium
[Appium] Welcome to Appium v1.5.1 (REV e1c84bae37afae282f39b91025435c3717e6d0ab)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"","appium-version":"1.3","platformName":"iOS","platformVersion":"9.1","deviceName":"iPhone 5","app":"/Users/shawn/Desktop/vigour-native.app"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"","appium-version":"1.3","platformName":"iOS","platformVersion":"9.1","deviceName":"iPhone 5","app":"/Users/shawn/Desktop/vigour-n...
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] browserName: ''
[Appium] appium-version: '1.3'
[Appium] platformName: 'iOS'
@shawninder
shawninder / streaming js to browserify
Created March 31, 2016 16:21
Example of streaming data to browserify instead of passing it the path to a file
'use strict'
var Stream = require('stream')
var browserify = require('browserify')
var st = new Stream.Readable()
var js = '// A string of javascript with requires'
st.push(js, 'utf8')
st.push(null)
var b = browserify(st).bundle()