codecorico / ractive-require Goto Github PK
View Code? Open in Web Editor NEWRequire Ractive views on demand in Package by Feature way
Home Page: http://ractive-require.codecorico.com
License: MIT License
Require Ractive views on demand in Package by Feature way
Home Page: http://ractive-require.codecorico.com
License: MIT License
Hello. I would like to know the preferred way to load external libraries. So I can load on demand ractive components that are self-contained, but what if they need a rich text editor, graphing library, table editing plugin, etcetera. This is heavy stuff I don't want to load if the user does not need it. Currently I'm using $.getScript.
Not sure if this is a question or a feature request ;-)?
Finally checked out this project tonight and it works well. I've got a handful of components I float around my own projects and RR feels like a fun way to integrate them.
Generally speaking though, I keep my components organized in their own directories. Say I want to keep template, style, and the component JS file for my image
component under /components/image/
, I'd actually have to tweak my src
attribute in my rv-require
tag to something that's not quite intuitive:
<rv-require name="image" src="components/image/image></rv-require>
By just declaring
<rv-require name="image" src="components/image></rv-require>
RR searches components/
for image.css
, image.js
, and image.html
.
I've updated a local copy of the script as a proof-of-concept and it seems to be intuitive to how I feel components are intended to be structured. Ideally I'd envision RR handling directories in a way such that
either <rv-require name="image" src="components/image></rv-require>
would assume image
is a directory, and search for each component resource therein by the name
attribute. Or, expose another attribute (ex. no-dir
, is-dir
) to dictate how/where component resources are loaded.
Thoughts?
I'm submitting a... (check one with "x")
[ ] bug report
[x] feature request
Current behavior
We are using the version 0.7.3 of RactiveJS
Expected behavior
We have to use the last version 0.8.0.
What is the motivation / use case for changing the behavior?
Browser/Server:
All
Node: node --version
= 6.5.0
Could you make a simple tutorial?
step by step.
thank you
the CDN has 0.2.0
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.