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.
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.
Go to ractive-require.codecorico.com
To contribute to the project, read the Contribution guidelines. After that, you can create your own Pull Requests (PR) and submit them here.
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