This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prints all the empty directories in the local dir. | |
find . -type d -empty -print | |
# Removes all the empty directories in the local dir. | |
find . -type d -empty -delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lint all files in the directory recursivly | |
eslint --fix --ext .js --ext .jsx . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.npmjs.com/package/v8-profiler | |
'use strict'; | |
var profiler = require('v8-profiler'); | |
profiler.startProfiling(); | |
// ... | |
var cpuProfile = profiler.stopProfiling(); | |
require('fs').writeFileSync(__dirname + '/foo.cpuprofile', JSON.stringify(cpuProfile)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TestUtils = React.addons.TestUtils; | |
var context = {}; | |
var elementWithContenxt = React.withContext(context, function () { | |
return new Element({ | |
prop1: 'property' | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var expect = require('expect'); | |
describe.only('Sample', function () { | |
beforeEach(function () { | |
this.currentTest.value = 'Winning!'; | |
}); | |
it('Uses current test data', function () { | |
expect(this.test.value).to.equal('Winning!'); |
NewerOlder