- Improving scroll performance with
passive event listeners.
- Always use a
DocumentFragmentwhen appending children to the main DOM tree.
- Further reading: mdn
|* A single data store for modules to communicate with. Keeping 'the truth' in a single place reduces bugs and allows|
|* for greater seperation of concerns.|
|* The module can be used as a singleton through DataStore.getSingleton('key'), or on instance basis through the new keyword.|
|* Uses the Observer module found here: https://gist.github.com/peeke/42a3f30c2a3856c65c224cc8a47b95f9|
|* @name DataStore|
|* @author Peeke Kuepers|
|* Used for inter-object communication.|
|* (Semi-)drop in replacement for Rik Schennink's Observer.|
|* Implementation differences:|
|* - ES6|
|* - The use of WeakMaps|
|* - inform() and conceal() don't return a boolean indicating success.|
|* - Subscription fn's are called with seperate arguments, instead of one data parameter. This is backwards compatible.|
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
You want a script that does a local compile to e.g. an
out/ directory. Let's call this
compile.sh for our purposes, but for your project it might be
npm build or
gulp make-docs or anything similar.
out/ directory should contain everything you want deployed to
gh-pages. That almost always includes an
|* sets globals __line, __file, __ext, __dir and __function|
|* http://goo.gl/wwjGVV and http://goo.gl/umq4s1|
|* todo: __method, __class/__constructor|
|// begin setting magic properties into global (required for other functions)|