Skip to content

Instantly share code, notes, and snippets.

View SilentImp's full-sized avatar
💭
ok, now it is social network

SilentImp SilentImp

💭
ok, now it is social network
View GitHub Profile
/**
* Check if there user with specified name on github
* @public
* @function
* @param {String} login Github login
* @return {Promise} Promise wich will resolve with object,
* containing fiels: success and payload
*/
static async checkGithub(login) {
const response = await fetch(`${config.servicesURL}/github/check/${login}`);
@SilentImp
SilentImp / some.jsx
Created June 30, 2017 04:49
example of multiple stores
/**
* Add state to props
* @param {Object} state current component state
* @return {Object} state elements that should be added to props
*/
function mapStateToProps(state) {
return {
state: state.Contributors,
me: state.Me,
@SilentImp
SilentImp / .stylelintrc
Created April 27, 2017 11:46
Style Linting
// Конфиг
{
"extends": "stylelint-config-standard",
"rules": {
"number-leading-zero": "never"
}
}
@SilentImp
SilentImp / babel.js
Last active October 26, 2020 20:55
How to configure Magento 2 to transpile es6
'use strict';
var combo = require('./combo'),
themes = require('./themes'),
_ = require('underscore');
var themeOptions = {};
_.each(themes, function(theme, name) {
if (typeof theme.babelFiles != "undefined") {
themeOptions[name] = {