Skip to content

Instantly share code, notes, and snippets.

View awinogradov's full-sized avatar
:octocat:
Coding happiness

Tony Vi awinogradov

:octocat:
Coding happiness
View GitHub Profile
// If you are using borschik to expand links (bem make and enb do this for you)
// you could use this hack for any jQuery plugin found in the wild
modules.define('i-jquery__my-plugin', ['jquery'], function(provide, $){
var jQuery = $,
window = {jQuery: jQuery};
/*borschik:include:path/to/jquery-plugin.js*/
provide($);
});
module.exports = function (grunt) {
'use strict';
// Enb targets
var fs = require('fs');
var targetsList = [],
htmlList = [],
cssList = ['desktop.bundles/common/common.css', 'desktop.bundles/common/common.ie.css', 'desktop.bundles/common/common.ie8.css', 'desktop.bundles/common/common.ie9.css'],
jsList = ['desktop.bundles/common/common.js'];
block('credit-card')(
js()(true),
content()(function() {
return {
elem: 'card',
content: [
{
block: 'logo',
mods: { theme: 'gray' },
format: 'svg'
@awinogradov
awinogradov / gulpfile.js
Created April 7, 2014 09:26
bem-project distribution with Gulp
var pkg = require('./package.json'),
settings = pkg._settings,
bem = require('bem').api,
gulp = require('gulp'),
gif = require('gulp-if'),
csso = require('gulp-csso'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
replace = require('gulp-replace'),
path = require('path'),
// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
@media print {
html * {
text-shadow: none !important;
color:#000 !important; // Black prints faster: h5bp.com/s
background: transparent !important;
box-shadow:none !important;
}
@awinogradov
awinogradov / gulpfile.js
Created May 23, 2014 07:08
gulpfile for work with bem-ng
var pkg = require('./package.json'),
dirs = pkg._directories,
bem = require('bem').api,
gulp = require('gulp'),
gif = require('gulp-if'),
csso = require('gulp-csso'),
concat = require('gulp-concat'),
notify = require('gulp-notify'),
rename = require('gulp-rename'),
path = require('path'),
@awinogradov
awinogradov / input.bemjson.js
Last active August 29, 2015 14:02
Select on BEMHTML
{
block: 'input',
mods: {type: 'select'},
options: [
{
name: 'one',
val: 1
},
{
name: 'two',
@awinogradov
awinogradov / connections
Created September 6, 2014 12:40
Connections to protoyping
[BS] [DEBUG]: Browser Connected! (Chrome, version: 36.0.1985.135)
[BS] [DEBUG]: Browser Connected! (Chrome, version: 34.0.1847.131)
[BS] [DEBUG]: Browser Connected! (Yandex, version: 14.7.1916.15575)
[BS] [DEBUG]: Browser Connected! (WebKit, version: 537.51.2)
[BS] [DEBUG]: Browser Connected! (Firefox, version: 32.0)
[BS] [DEBUG]: Browser Connected! (Chrome, version: 37.0.2062.94)
[BS] [DEBUG]: Browser Connected! (Safari, version: 7.0.6)
[BS] [DEBUG]: Browser Connected! (Mobile Safari, version: 7.0)
[BS] [DEBUG]: Browser Connected! (Mobile Safari, version: 7.0)
[BS] [DEBUG]: Browser Connected! (Mobile Safari, version: 7.0)
/**
* @module vow-queue
* @author Filatov Dmitry <dfilatov@yandex-team.ru>
* @version 0.3.1
* @license
* Dual licensed under the MIT and GPL licenses:
* * http://www.opensource.org/licenses/mit-license.php
* * http://www.gnu.org/licenses/gpl.html
*/
exports.deps = [
{
"block": "page"
},
{
"block": "page",
"elem": "css"
},
{
"block": "page",