#structure
/global
/components
global holds components shared by other components, components are privately scoped components.
#structure per component
/foobar
| { | |
| "color_scheme": "Packages/Colorsublime-Themes/Solarized (dark).tmTheme", | |
| "font_size": 11, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], | |
| "margin": -5 | |
| } |
#structure
/global
/components
global holds components shared by other components, components are privately scoped components.
#structure per component
/foobar
| (function(name, global, factory) { | |
| //amd | |
| if (typeof global.define === 'function' && global.define.amd) | |
| global.define([], function() { return factory; }); | |
| //common js | |
| else if (typeof global.module === 'object' && global.module.exports) { | |
| global.module.exports = factory; | |
| var path = require('path'), | |
| webpack = require('webpack'), | |
| packageJson = require('./package.json'); | |
| module.exports = { | |
| devtool: 'eval', | |
| context: __dirname, |
| (function(root, name, factory) { | |
| root[name] = factory(); | |
| })(this, 'Log', function() { | |
| 'use strict'; | |
| /** | |
| * @constructor Log | |
| * logs pretty, easy | |
| * | |
| * @param {string} - message to log |
| breakpoints: | |
| mobile: | |
| max: "600px" | |
| tablet: | |
| min: "601px" | |
| max: "1000px" | |
| desktop: | |
| min: "1001px" |
| 'use strict'; | |
| function deepsearch_find_first(needle, haystack, parent) { | |
| let iterable; | |
| if (Object.prototype.toString.call(haystack) === '[object Array]') { | |
| iterable = haystack; | |
| } else if (Object.prototype.toString.call(haystack) === '[object Object]') { | |
| iterable = Object.keys(haystack); |
| function deepsearch_get_keys(haystack, bucket = []) { | |
| let i = 0; | |
| let p; | |
| if (Object.prototype.toString.call(haystack) === '[object Array]') { | |
| for (i; i < haystack.length; i++) | |
| ds(haystack[i], bucket); | |
| } | |
| function deepsearch_pull_matches(needle, haystack, parent, bucket = []) { | |
| let i = 0; | |
| let p; | |
| let found; | |
| if (Object.prototype.toString.call(haystack) === '[object Array]') { | |
| for (i; i < haystack.length; i++) { | |
| found = ds(needle, haystack[i], haystack, bucket); | |
| if (found !== undefined && found !== bucket) |
| function deepsearch_find_first_make_path(needle, haystack, delimiter = '.', path = []) { | |
| let i = 0; | |
| let p; | |
| let found; | |
| if (Object.prototype.toString.call(haystack) === '[object Array]') { | |
| for (i; i < haystack.length; i++) { | |
| found = deepsearch_find_first_make_path(needle, haystack[i], delimiter, path.concat(i)); | |
| if (found && found !== path) { |