joelpurra / bespoke-convenient Goto Github PK
View Code? Open in Web Editor NEWConvenient extension methods for building Bespoke.js plugins
Home Page: https://joelpurra.com/projects/bespoke-convenient/
License: Other
Convenient extension methods for building Bespoke.js plugins
Home Page: https://joelpurra.com/projects/bespoke-convenient/
License: Other
Issue based on bespoke-secondary pull request #2, automatically run dependant plugins, by @markdalgleish.
Unfortunately, automatic loading/activation of dependencies in secondary would (potentially) break other plugins depending on convenient or indexfinger, such as jumpy and logbook. These dependencies may currently work anyways, by chance, but they are not prepared for multiple deck activations.
Dependency checking, activation and protection against multiple deck activations is something I could build into convenient, as all of my bespoke plugins depend on it. Maybe even a dependency graph, for proper load order. Then even convenient itself could conveniently be split to smaller parts.
Things sure get out of hand quick sometimes ;)
It's all fine and dandy for both convenient and indexfinger to be loaded as "automatic dependencies", as they don't accept any options, in their current versions. Just to keep it in mind, there's one future/bigger picture problem though - plugin options passed at activation time might conflict.
Plugin A, depending on somedependency
:
bespoke.plugins.somedependency(deck,
{
custom: "smart non-default value"
});
Plugin B, also depending on somedependency
:
bespoke.plugins.somedependency(deck,
{
custom: "conflicting non-default value"
});
Plugin C, also depending on somedependency
, but using only default values.
bespoke.plugins.somedependency(deck);
I'm thinking of:
var cv = convenient.builder(pluginName);
The per plugin option merging would allow for things like document level event listeners to be rewired, if necessary.
Thoughts, suggestions?
npm throws the following error when trying to install:
โ > npm i -D bespoke-jumpy
npm ERR! peerinvalid The package bespoke does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants bespoke@^1.0.0
npm ERR! peerinvalid Peer [email protected] wants bespoke@^1.0.0
npm ERR! peerinvalid Peer [email protected] wants bespoke@~0.3.1
npm ERR! peerinvalid Peer [email protected] wants bespoke@^1.0.0
npm ERR! peerinvalid Peer [email protected] wants bespoke@~0.3.1
npm ERR! peerinvalid Peer [email protected] wants bespoke@^1.0.0-beta
npm ERR! peerinvalid Peer [email protected] wants bespoke@^1.0.0
npm ERR! peerinvalid Peer [email protected] wants bespoke@^1.0.0
npm ERR! peerinvalid Peer [email protected] wants bespoke@^1.0.0
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "i" "-D" "bespoke-jumpy"
npm ERR! cwd /Users/someuser/somerepo
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.24
npm ERR! code EPEERINVALID
Might be related to the new plugin architecture, but I haven't dug that far.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.