Giter Club home page Giter Club logo

ractive-require's Introduction

Ractive-Require

Join the chat at https://gitter.im/CodeCorico/ractive-require

Require Ractive views on demand in Package by Feature way.

Ractive-Require is an extension to Ractive.js that provides the support to require features on demand. A feature is composed by a HTML template file, and its JavaScript and CSS assets. They are not loaded on the page as long as the user does't need to use it.

Installation

Use the CDN version:

<script src="https://cdnjs.cloudflare.com/ajax/libs/ractive-require/0.6.12/ractive-require.min.js"></script>

Or copy the dist folder into your project and include ractive-require.js or ractive-require.min.js (production) file in your HTML page after Ractive.

Documentation

Go to ractive-require.codecorico.com

Contribute

To contribute to the project, read the Contribution guidelines. After that, you can create your own Pull Requests (PR) and submit them here.

Build the distribution files

If you want to hack on Ractive-Require, the first step is to clone the repo and install all its development dependencies:

git clone https://github.com/CodeCorico/ractive-require   # or your fork
ractive-require
npm install

You have to install gulp

npm install gulp -g

Then you can build the distribution files with:

gulp build

Lead contribution team

ractive-require's People

Contributors

frostbane avatar gitter-badger avatar xavierboubert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ractive-require's Issues

Tutorial

Could you make a simple tutorial?
step by step.
thank you

Is it possible to load "vendor" javascript libraries on demand?

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 ;-)?

Apply new RactiveJS 0.8.0 version

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?

  • Investigation of the possible regressions.
  • Apply the new version

Browser/Server:
All

Node: node --version = 6.5.0

FR - Component as-a-directory support

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.