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
'use strict'; | |
const filtr = require('filterable'); | |
module.exports = toJSFunction; | |
function toJSFunction(conditions) { | |
const keys = []; | |
const includes = ($v, v) => typeof v === 'string' ? | |
$v.toLowerCase().indexOf(v.toLowerCase()) !== -1 : | |
v.some((_v) => $v.toLowerCase() === _v.toLowerCase()); |
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
let REFLECTION_ID = 0; | |
const ReflectionFlag = { | |
Private: 1, | |
Protected: 2, | |
Public: 4, | |
Static: 8, | |
Exported: 16, | |
ExportAssignment: 32, | |
External: 64, |
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
// Узел содержит значение с маской и связи. Формат узла: | |
{ | |
scope: {block: ?String, elem: ?String}, | |
block: ?String, | |
elems: ?Array<{ | |
scope: {block: ?String, elem: ?String}, | |
elem: ?String, | |
mods: ?Object<String, String[]>, | |
shouldDeps: ?Array, | |
mustDeps: ?Array |
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
/* $ for i in common.blocks/button2/_theme/button2_theme_*.css; echo $i:; head $i; echo '---'; end */ | |
/* common.blocks/button2/_theme/button2_theme_action.css: */ | |
.button2_theme_action { | |
position: relative; | |
z-index: 0; | |
color: #000; | |
border: none; | |
outline: none; | |
} |
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
/node_modules | |
/.gitignore |
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
const path = require('path'); | |
const gulp = require('gulp'); | |
const debug = require('gulp-debug'); | |
const Builder = require('gulp-bem-bundle-builder'); | |
const bundler = require('gulp-bem-bundler-fs'); | |
const postcss = require('gulp-postcss'); | |
const postcssUrl = require('postcss-url'); | |
const autoprefixer = require('autoprefixer'); | |
const csso = require('gulp-csso'); |
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
parserOptions: | |
ecmaVersion: 6 | |
sourceType: module | |
env: | |
node: true | |
es6: true | |
extends: pedant |
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
module.exports = function comb(matrix) { | |
return Object.keys(matrix).reduce((res, k) => _fillIn(res, k, matrix[k]), [{}]); | |
/** | |
* Adds all combinations of existing array and incoming variants | |
* @param {Array<Object>} combinations - existing combinations | |
* @param {String} key - new key for items in combinations | |
* @param {Array} values - values for new key | |
* @returns {Array<Object>} - modified | |
*/ |
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
nodeConfig.addTechs([ | |
[require('enb-define'), { | |
target: '?.fullofconsoles.js', | |
sources: ['?.js'], | |
variables: { | |
ISLDEBUG: '*/!/*' | |
}, | |
sourcemap: true | |
}] | |
]); |
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
String.prototype.toCamelCase = function() { | |
return this.substr(0, 1).toLowerCase() + this.substr(1).replace(/[\-_][a-z]/g, function($0){return $0.toUpperCase().replace(/[\_\-]/,'');}); | |
}; | |
String.prototype.toPascalCase = function() { | |
return this.substr(0, 1).toUpperCase() + this.substr(1).toCamelCase(); | |
}; | |
String.prototype.toUnderscore = function() { | |
return this.toCamelCase().replace(/[A-Z]/g, function($0){return "_"+$0.toLowerCase();}).replace(/^_/,''); | |
}; | |
String.prototype.toDash = function() { |