DocPad: Minify your assets with Grunt
The following will minify your assets with grunt each time a generation write completes.
Installation
- Install Dependencies
27ms Created RTCPeerConnnection with: config: '{"iceServers":[{"url":"stun:stun.l.google.com:19302"}]}'; constraints: '{"mandatory":{"OfferToReceiveAudio":true,"OfferToReceiveVideo":true}}'. | |
85ms onSignalingStateChanged() ::, signalingstatechange | |
86ms Set session description success. | |
221ms ICE Candidate. Type:, HOST, Medium:, audio, Candidate:, a=candidate:505434299 1 udp 2113937151 192.168.1.6 61829 typ host generation 0 | |
221ms ICE Candidate. Type:, HOST, Medium:, audio, Candidate:, a=candidate:505434299 2 udp 2113937151 192.168.1.6 61829 typ host generation 0 |
test('test case', function(done) { | |
promise.method(function(result) { | |
assert.equal(result.name, 'mocha'); | |
}).then(done, done); | |
}); |
The following will minify your assets with grunt each time a generation write completes.
'use strict'; | |
module.exports = function(grunt) { | |
// Override process.stdout to log the name+args of the current task before | |
// every logged line. | |
var hooker = require('hooker'); | |
var newline = true; | |
hooker.hook(process.stdout, 'write', function(str) { | |
var prefix = grunt.task.current.nameArgs; | |
if (newline && prefix && str !== '\n') { |
function settleAll(array) { | |
return when(array, function(array) { | |
var i, len, results; | |
results = []; | |
for(i = 0, len = array.length; i < len; i++) { | |
if(i in array) { | |
results[i] = when(array[i], null, identity); | |
} |
module.exports = function (grunt) { | |
require('load-grunt-tasks')(grunt); | |
grunt.initConfig({ | |
express: { | |
options: { | |
// Override defaults here | |
}, | |
web: { | |
options: { |
var assert = require('chai').assert; | |
var when = require('when'); | |
var def1 = when.defer(); | |
function getProm() { | |
return def1.promise; | |
} |
[In reply to https://news.ycombinator.com/item?id=7219005]
Here's the history, hope it helps.
I wrote the original version of the npm registry in a day or two on top of CouchDB. I built it quickly and didn't think much about scale.
Isaacs continued to improve and maintain that code. At one point he even wrote up an open standard for generic js package registries for CommonJS but they didn't seem to care (they were too busy arguing about promises).
At the time I wrote the initial code I was employed at CouchOne and we had a small CouchDB hosting platform operated by Jason Smith which is where we ran the registry free of charge. Later on, after CouchOne was aquired by Membase and became Couchbase, it decided to break off the hosting company and give/sell it to Jason Smith, which became IrisCouch.
/** | |
* @fileOverview Singleton pattern on ES6. | |
*/ | |
import logger from './logger.midd'; | |
/** | |
* The class statement. | |
* | |
*/ |
I've known people at nodejitsu for years, since before the company even existed. I still consider many of them friends. That said, somebody over there has lost their mind.
Trademarks are an important part of open source. They protect the integrity of the trust that is built by any project. A classic example of why this is the case is Firefox. Suppose that a malware producer takes the Firefox codebase, which is free and open source, packages up their malware with it and then releases it as "Firefox". Then they buy search advertising and suddenly their bad and malicious version of Firefox is the first result on search engines across the web. This is clearly a bad thing for Firefox and open source everywhere, but what can Mozilla do to protect their community of users?
They can't enforce a software license since the use is permitted under the Mozilla Public License. They can, however, enforce on these hypothetical bad actors using their trademark on the word "Fi