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
export class ArchiveUpload extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
borderColorPreview: false, | |
borderPickerPreview: false, | |
borderColor: '#fff', | |
} | |
} |
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
export class RulesWrapTabs extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
activeIndex: 0, | |
} | |
} | |
render() { | |
return ( |
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
{ | |
"render": [ | |
{ | |
"id": "facade", | |
"material": [ | |
{ | |
"colors": [ | |
{"name": "1014", "color": "#ded09f", "src": "roof/roofMaterial1/1014.png"}, | |
{"name": "2004", "color": "#e85b13", "src": "roof/roofMaterial1/2004.png"}, | |
{"name": "3005", "color": "#5d2028", "src": "roof/roofMaterial1/3005.png"}, |
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 getPixels = require('get-pixels') | |
const GIFEncoder = require('gif-encoder') | |
const fs = require('fs') | |
const imagemin = require('imagemin') | |
const imageminGiflossy = require('imagemin-giflossy') | |
const imageminGifsicle = require('imagemin-gifsicle') | |
const images = [ | |
{delay: 200, path: 'image/1.png'}, | |
{delay: 200, path: 'image/1.png'}, |
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 cheerio = require('cheerio') | |
const fs = require('fs-extra') | |
const { process } = require('../temp-path')() | |
const { Area, Rules } = require('../../models') | |
const types = require('./types') | |
function addElement({ | |
type, bind_element: element, position, content, | |
}, folderName, fileName) { |
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
// обьект маппера. Ф-я mapper будет для каждого промиса вызываться | |
// и колбэки что бы отследить ошибки и конец маппера | |
const mapObj = { | |
arr: [], | |
errorCb(error) { | |
console.log('error') | |
}, | |
resolveCb(lastResolve) { | |
console.log('resolveCb', lastResolve) | |
}, |
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 asyncMap(arr, mapper, initialData) { | |
let q = Promise.resolve() | |
return Promise | |
.all(arr.map(v => q = q.then((data = initialData) => mapper(v, data)))) | |
.then(resolve => resolve[resolve.length - 1]) | |
} | |
// так выглядит юзание | |
asyncMap(rs, mapperFn, $.html()) |
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 cheerio = require('cheerio') | |
const debug = require('debug')('banner:firmware-util') | |
const fs = require('fs-extra') | |
const { Area, Rules, Sequelize } = require('../../models') | |
const { process, area } = require('../temp-path')() | |
const computed = require('./computed') | |
const asyncMap = require('./mapper') | |
const resolveFn = require('./resolve-fn') | |
const mapperFn = require('./mapper-fn') |
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 wrapGif(imgData, pathReadyGif) { | |
const { w, h, data, repeat } = imgData | |
const gif = new GIFEncoder(w, h) | |
const stream = fs.createWriteStream(pathReadyGif) | |
let counter = 0 | |
gif.pipe(stream) | |
gif.setQuality(10) | |
gif.setDelay(0) | |
gif.writeHeader() |
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
cargo-x86_64-unknown-linux-gnu (default) | |
rls-preview-x86_64-unknown-linux-gnu | |
rust-analysis-x86_64-unknown-linux-gnu | |
rust-docs-x86_64-unknown-linux-gnu (default) | |
rust-src | |
rust-std-aarch64-apple-ios | |
rust-std-aarch64-linux-android | |
rust-std-aarch64-unknown-fuchsia | |
rust-std-aarch64-unknown-linux-gnu | |
rust-std-aarch64-unknown-linux-musl |