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
import omit from 'lodash/omit' | |
import flatten from 'lodash/flattenDeep' | |
import isEqual from 'lodash/isEqual' | |
import Element from './element' | |
import shallowEqual from 'shallow-equal/objects' | |
import hash from 'string-hash' | |
let queue = Promise.resolve(), | |
currentId, | |
frames = {} |
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
import path from "path"; | |
import webpack from "webpack"; | |
module.exports = env => { | |
const devBabelPresets = env.dev ? [ | |
["env", { modules: false, loose: true, "targets": { "chrome": 55 } }] | |
] : []; | |
const prodBabelPresets = env.prod ? [ |
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
// MANUALLY | |
// Create deep observer, pre-select tree | |
let observer = createObserverDeep(store, () => store.getState().tree) | |
// Use it to observe object 5 (Sketch) | |
let unsubscribe = observer(state => state.get("5"), (state, previous) => console.log(state, previous)) | |
// Change vector x-coordinate in object 4 (Endpoint), deeply linked to object 5 (Sketch)) | |
session.patch([ { op: 'replace', path: '/4/vector/0', value: 100 } ]) |