This file contains hidden or 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 rimraf = require('rimraf'); | |
gulp.task('clean', function (cb) { | |
rimraf('./dir', cb); | |
}); | |
gulp.task('build', ['clean'], function() { | |
// Something | |
}); |
This file contains hidden or 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
'use strict'; | |
var Transform = require('stream').Transform; | |
var imageSize = require('image-size'); | |
const LIMIT = 128 * 1024; | |
class ImageSizeStream extends Transform { | |
constructor () { | |
super(); |
This file contains hidden or 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
admin | |
account | |
help | |
about | |
enterprise | |
join | |
new | |
shop | |
contact | |
training |
This file contains hidden or 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
def assert_each_text(selector, array_of_text) | |
array_of_text.map{|text| {text: /^#{Regexp.quote(text)}$/}}.each.with_index(1) do |opt, i| | |
assert_selector "#{selector}:nth-of-type(#{i})#{i == array_of_text.size ? ':last-of-type' : ''}", opt.merge!(count: 1) | |
end | |
end | |
def assert_each_text(selector, array_of_text) | |
array_of_text.map{|text| {text: /^#{text}$/, count: 1}}.each.with_index(1) do |opts, i| | |
assert_selector "#{selector}:nth-of-type(#{i})#{i == array_of_text.size ? ':last-of-type' : ''}", opts | |
end |
OlderNewer